summaryrefslogtreecommitdiff
path: root/parser/tokens.go
AgeCommit message (Collapse)Author
40 hoursfix: improve parsing of assign statementsMarc Vertes
Handle assign statements in parseAssign function. Detect multi-assign by the presence of comma in the right hand side tokens. The case of swap is not handled yet.
3 daysfeat: make Next iterator instruction faster and more efficientMarc Vertes
Branching control is delegated directly to the Next instruction, which now takes the location of loop exit as first argument. It avoids the use of JumpFalse, plus the stack storage for the condition.
4 dayschore: use token helpersMarc Vertes
4 dayschore: refactor token types to avoid mutate scanner tokensMarc Vertes
Mutating scanner tokens or reusing scanner token attributes to store other metadata is a hack. Introduce a new parser token type with arbitrary args. The next step will be to use the arg field instead of scanner token fields.
2025-11-16fix lintMarc Vertes
2024-04-02chore: add linters and some lint fixes (#8)Marc Vertes
* chore: add linters and some lint fixes Configure some golangci-lint linters to get the code quality right. Apply the first fixes. Next step will be to add github actions to run lint and tests in github CI. * chore: more lint, fixed comments and variable names. no semantic change. * chore: add Makefile This makefile is intended to be used as a local substitute to github actions.
2024-03-14feat: improve debug output of tokensMarc Vertes
2024-01-15chore: import from gnolangMarc Vertes
2023-11-10parser: implement support for var declarationsMarc Vertes
The full Go syntax is supported, blocks or line, mutiple comma separated variables, assignments. In local and global frame.