Closed herwinw closed 1 year ago
This looks like a duplicate of #49, maybe I've been using an older version of the parser?
This has been fixed in the parser. To build with a newer parser:
git -C ext/natalie_parser fetch
git -C ext/natalie_parser checkout master
rake SKIP_SUBMODULE_UPDATE=1
bin/natalie -e '$a = $b'
However, this does break the compiler:
lib/natalie/compiler/pass1.rb:51:in `transform_expression': undefined method `transform_valias' for <Natalie::Compiler::Pass1:0x3c>:Natalie::Compiler::Pass1 (NoMethodError)
Array(send(method, exp, used: used)).flatten
^^^^
Did you mean? transform_alias
transform_false
transform_*bunch_of_other_methods*
It does have a couple of specs in the language folder (https://github.com/ruby/spec/blob/d31cf749dfa03ef7ddc317044c858226f5370568/language/alias_spec.rb#L279), so there is no explicit need to keep this case open or open a sequel case in natalie.
Source: https://github.com/ruby/spec/blob/c037246cb4034e677493fb9fe34a9042308c261c/language/alias_spec.rb#L281
The following line:
Results in a parse error in Natalie