Rich2 / openstrat

Cross Platform Scala 2d graphics (but 3d compatible), basic geometry, maps, Earth maps, hex-tiling and strategy library(s).
https://richstrat.com
Apache License 2.0
22 stars 8 forks source link

AST 2.1 Abstract Syntax Tree #187

Open Rich2 opened 2 years ago

Rich2 commented 2 years ago

AST Version 2.1

The syntax tree is defined by the following hierarchy from lowest precedence to highest.

1 Statements 2 Assignment operator expressions 3 Colon operator expressions 4 Clauses 5 The rest of the Scala operator precedence value 6 Spaced Tokens 7 Dot separated Tokens

A File can be interpreted as an expression or a statement sequence. Files and directories can be included in the syntax tree. This needs to be worked out.

in version 2.0, colon operator expressions had a higher precedence than clauses. In version 1 they had a higher precedence than an assignment operator.