JohnDTill / Forscape

Scientific computing language
MIT License
176 stars 3 forks source link

Implicit mult precedence #82

Closed JohnDTill closed 2 years ago

JohnDTill commented 2 years ago

Implicit mult wreaks havoc on parse precedence, but this pull request introduces workarounds to get the correct behaviour (and tests, crucially). Parsing expressions like f(x)^y is deferred until type resolution. Single-char implicit mult expressions are transformed e.g. xy^2 => x(y^2).