syntax-objects / Summer2021

Syntax Parse Bee 2021
11 stars 3 forks source link

Dot notation for objects and general properties. Underscore notation for indexing. #15

Closed soegaard closed 2 years ago

soegaard commented 3 years ago

Macro

The macro implementation is here:

https://github.com/bennn/syntax-parse-example/pull/26

The purpose of the macro is to allow dot notation for field and method acccess for objects. The macro also supports properties for non-object types. The underscore notation can be used for indexing of vectors and strings.

Example

https://github.com/bennn/syntax-parse-example/blob/8549f617cdeafe136cea7a285eb03b7e00a3ab20/dot-underscore/test-dot-underscore.rkt

Before and After

Licence

https://github.com/racket/racket/blob/master/racket/src/LICENSE-MIT.txt http://creativecommons.org/licenses/by/4.0/