Skip to content

Simplify/unify scope handling for object literal support #182

Open
@smarr

Description

@smarr

The object literal support introduced with #112 avoids changing some of the scope handling infrastructure and instead of modeling lexical scope as a single chain, it introduces direct access to scopes of objects.

Specifically, the MixinBuilder has not an outer builder and an outer method, it should only have a single outer scope, the rest should be reached through traversal.
Same issue was introduced in the MixinScope class, there we also got two scope information now.

This could be hiding bugs, and made it hard to implement the contextual nodes in a way that the parser determines correctly the chain of casts needed to get to the outer context.
Currently, the chain is determined at run time, because I had issues to get it correct during inlining.
The parser support worked, but finding the right data to have the chain correct after splitting was an issue.

So, we should fix:

  • duplicated scope info/non-uniform scope handling
  • construct scope traversal in ContextualNode in parser

Metadata

Metadata

Assignees

Labels

enhancementImproves the implementation with something noteworthygood first issueAre you trying to have a good at SOMns? Start here!help wantedWould be great if you could help out here.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions