pxp-lang / pxp

A suite of high-performance tools for PHP developers – includes a code formatter, static analyser, language server and superset language.
https://pxplang.org
Other
784 stars 0 forks source link

Create some sort of `Name` structure #45

Closed ryangjchandler closed 8 months ago

ryangjchandler commented 8 months ago

The lexer currently produces three types of identifier tokens:

These are a bit of a pain to work with, because we don't have any way of getting each "component" of the identifier / name without reaching into the SymbolTable and doing a bunch of byte string manipulation.

If we could find a way to tokenise these with both a full symbol for the entire identifier, as well as individual symbols for each "component" it would make life a lot easier.

It will take a bit of doing to find a nice API for this though, since we want to keep Token as a Copy-able thing.