rhaiscript / lsp

Language server for Rhai.
Apache License 2.0
43 stars 4 forks source link

Finish Parser #1

Closed tamasfe closed 2 years ago

tamasfe commented 2 years ago

All tokens are available from the Rhai book.

Only very simple code can be parsed right now, a Pratt parsing algorithm is required for expressions (and precedence).

tamasfe commented 2 years ago

All upstream example code parse tests succeed, I'm sure it's not perfect and edge-cases can occur (especially with string interpolations).

The parser performance improved a lot as well as we now rarely create errors and thus there are a lot less allocations: 2021-10-04_23-27