Parsing support for the :last-child pseudo class.
This commit is contained in:
1 parent
b4fec3cc8c
commit
7a606a11d3
2 files changed
+24
No files matched your search
@@ -501,6 +501,19 @@ end
|
||||
)
|
||||
end
|
||||
|
||||
##
|
||||
# Generates the AST for the `:last-child` selector.
|
||||
#
|
||||
# @return [AST::Node]
|
||||
#
|
||||
def on_pseudo_class_last_child
|
||||
return s(
|
||||
:eq,
|
||||
s(:call, 'count', s(:axis, 'following-sibling', s(:test, nil, '*'))),
|
||||
s(:int, 0)
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
##
|
||||
|
||||
Reference in new issue
Block a user