luau-lang / luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
https://luau-lang.org
MIT License
3.79k stars 349 forks source link

implement leading bar and ampersand in types #1286

Closed jackdotink closed 1 month ago

jackdotink commented 1 month ago

Implements the Leading | and & in types RFC.

The changes to the parser are exactly as described in the RFC. I added two tests, one for leading | and one for leading &.

alexmccord commented 1 month ago

The PR looks great! Can you flag the changes?