brain icon indicating copy to clipboard operation
brain copied to clipboard

Assignment to Fields

Open sunjay opened this issue 7 years ago • 0 comments

Currently, the AST only supports assignment to plain identifiers. The grammar should support assignment to fields (at an arbitrary depth).

// currently supported
foo = 2;

// wanted
bar.foo.spam = 4;
bar.foo.spam.car = 4;

Note that this is just the grammar to support this. The actual implementation will be when #39 is completed.

  • [ ] Fields should be properly nested so that foo.bar.spam.car = 4 is equivalent to ((foo.bar).spam).car = 4. (like #57)
  • [ ] Field privacy should be respected

sunjay avatar Mar 04 '17 22:03 sunjay