Ruby generator support for Ranges
This commit is contained in:
1 parent
ec19875530
commit
32dba554d7
2 files changed
+25
No files matched your search
@@ -208,6 +208,21 @@ end
|
||||
EOF
|
||||
end
|
||||
|
||||
##
|
||||
# Processes a Range node.
|
||||
#
|
||||
# @param [Oga::Ruby::Node] ast
|
||||
# @return [String]
|
||||
#
|
||||
def on_range(ast)
|
||||
start, stop = *ast
|
||||
|
||||
start_str = process(start)
|
||||
stop_str = process(stop)
|
||||
|
||||
"(#{start_str}..#{stop_str})"
|
||||
end
|
||||
|
||||
##
|
||||
# Processes a string node.
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user