lib/liquidscript/compiler/icr/literals.rb in liquidscript-0.5.1 vs lib/liquidscript/compiler/icr/literals.rb in liquidscript-0.6.0
- old
+ new
@@ -66,15 +66,11 @@
def compile_identifier(identifier)
default = action do
code :get, ref(identifier)
end
- expect :equal => action { compile_assignment(identifier) },
- :prop => action { compile_property(identifier) },
- :lparen => action { compile_call(identifier) },
- :unop => action { |o| code :op, ref(identifier), o },
- :_ => default
+ value_expect(identifier, &default)
end
def compile_regex
code :regex, shift(:regex)
end
@@ -161,10 +157,10 @@
code :array, parts
end
def compile_object_key
- key = shift :identifier, :dstring
+ key = shift :identifier, :istring
shift :colon
key
end