lib/import/shake_grammar/lexer.rb in tracksperanto-1.9.5 vs lib/import/shake_grammar/lexer.rb in tracksperanto-1.9.6
- old
+ new
@@ -69,11 +69,11 @@
consume_atom!
@buf << c
elsif (c == ";" || c == "\n")
# Skip these - the subexpression already is expanded anyway
elsif (c == "=")
- push [:assign, @buf.strip, self.class.new(@io, @sentinel, to_semicolon = true, @stack_depth + 1).stack.shift]
+ push [:assign, vardef(@buf.strip), self.class.new(@io, @sentinel, to_semicolon = true, @stack_depth + 1).stack.shift]
@buf = ''
else
@buf << c
end
end
@@ -112,8 +112,12 @@
string.strip.gsub(/^\"/, '').gsub(/\"$/, '').gsub(/\\\"/, '"')
end
def push(atom_array)
@stack << atom_array
+ end
+
+ def vardef(var_specifier)
+ [:vardef] + var_specifier.split
end
end
end
\ No newline at end of file