rhaiscript / lsp

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

Support ranges #34

Closed tamasfe closed 2 years ago

tamasfe commented 2 years ago

Rhai 1.4.0 added range operators, these need to be added to both the parser and the HIR.

schungx commented 2 years ago

The HIR maybe not need a big change, since ranges is purely syntactic sugar. They compile down to Range and RangeInclusive types.

tamasfe commented 2 years ago

The parser should be able to parse them now. I don't think the HIR needs any specific changes, we can just define operator types that return Range and RangeInclusive respectively whenever a type system is implemented.