Initially, this pull request was intended to introduce identifiers with locators (^.^.^.apple, $.self). However several other things have to be done before this:
In order to test and debug the implementation, we need a working pretty-printer.
Existing pretty-printer had some issues that needed to be fixed.
In order to correctly pretty print some AST arrangements, parser needs to recognize single-line abstractions.
What was done:
Explicit locator chains are parsed into EOSimpleAppWithLocator. For example, EO code ^.^.^.a gets parsed into:
Initially, this pull request was intended to introduce identifiers with locators (
^.^.^.apple
,$.self
). However several other things have to be done before this:What was done:
^.^.^.a
gets parsed into:Previously, such expressions were parsed as:
EOSimpleApp
s withEOSimpleAppWithLocator
s. The following code without locators:[] > notShadowedObj obj > @
[] > shadowedObj [obj] > method [] > innerMethod obj > @ obj > @
[] > outer [] > self 256 > magic [] > dummy [outer] > dummyMethod outer > @ outer.self > @ self "yahoo" > @ [self] > method self.magic > @
[] > obj [self] > method $.self > @ [method] > shadowedMethod $.method > @ [] > notShadowedMethod ^.method > @ [] > notShadowedObj ^.obj > @ [] > shadowedObj [obj] > method [] > innerMethod ^.obj > @ $.obj > @ [] > outer [] > self 256 > magic [] > dummy [outer] > dummyMethod $.outer > @ ^.^.^.outer.self > @ ^.self > @ "yahoo" [self] > method $.self.magic > @
ast->toEO == ast->toEO->parsed->toEO