Ruby generator support for Ranges

This commit is contained in:
Yorick Peterse committed 2015-08-19 20:14:23 +02:00
1 parent ec19875530
commit 32dba554d7
2 files changed
+25

No files matched your search

+15
View File
@@ -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.
#