Parsing support for the :only-child pseudo.

This commit is contained in:
Yorick Peterse committed 2014-11-03 23:27:56 +01:00
1 parent 759bb71d17
commit 2cf058457d
2 files changed
+21

No files matched your search

+9
View File
@@ -532,6 +532,15 @@ end
return s(:eq, s(:call, 'position'), s(:call, 'last'))
end
##
# Generates the AST for the `:only-child` selector.
#
# @return [AST::Node]
#
def on_pseudo_class_only_child
return s(:and, on_pseudo_class_first_child, on_pseudo_class_last_child)
end
private
##