lib/starlark_compiler/writer.rb in starlark_compiler-0.3.0 vs lib/starlark_compiler/writer.rb in starlark_compiler-0.4.0
- old
+ new
@@ -95,9 +95,18 @@
end
write_newline unless single_line
io << ')'
end
+ def write_variable_reference(variable)
+ io << variable.var
+ end
+
+ def write_variable_assignment(assignment)
+ io << assignment.name << ' = '
+ write_node(assignment.var)
+ end
+
def write_array(array)
single_line = single_line?(array)
io << '['
end_index = array.elements.size.pred
array.elements.each_with_index do |node, i|