Information missing in the AST due to string concatenation
Closed this issue · 4 comments
laurentlb commented
The AST is relatively faithful to the input file and contains a lot of information (locations, raw data). One notable exception is due to an optimization in the parser: "a" + "b"
is replaced with "ab"
.
Is there a way to preserve this information?
Maybe optimizations on the AST could be done in a separate pass (in case we want to do other things like this)?
alandonovan commented
Currently there is not, but I agree optimizations should be done as an optional separate pass, perhaps by the resolver (or by the bytecode compiler if I ever decide to commit it).
alandonovan commented
alandonovan commented
Fixed now.
laurentlb commented
Thanks!