summaryrefslogtreecommitdiff
path: root/lang
AgeCommit message (Collapse)Author
2023-09-06scanner: add automatic insertion of semi-colon after newlineMarc Vertes
As specified in the Go specification, adapted to the following: - the scanner recognise blocks as tokens - the scanner is multi-language: define keywords in scanner spec - as a result, we define how to skip semi-colon insertion rather than how to add it.
2023-09-01parser: skip comment modesMarc Vertes
Refctor node kind names by concatenating category and instance, to allow better sorting. Comments are now parsed and skipped during generation of AST.
2023-08-25chore: appease lint and vetMarc Vertes
2023-08-24fix: parser must be initialized before useMarc Vertes
2023-08-09codegen: add a bytecode generator (#5)Marc Vertes
* codegen: add a bytecode generator * cleaning scanner, parser and vm1.
2023-07-24parser: define all node kinds to make the parser multi-language (#3)Marc Vertes
* parser: define all node kinds to make the parser multi-language Defining all AST node kinds in the parser is necessary to make the parser really multi-language. If a language requires a node kind not already present in parser/kind.go, it will be necessary to add it first here. Note that as long as a node kind subtree is structurally identical between languages, even if there are lexical and/or syntaxic differences, it can (and must) be shared amongst multiple language definitions. For example, an "if" statememt in shell script or in C code should give the same `IfStmt` at AST level. In order to let the parser deal with the various language syntaxes, and produce the right node kind and subtree, parser flags will be set in language definitions (see `Flags` field in `NodeSpec` struct). * lang/golang: use parser node kinds * vm0: remode dependency on language definition.
2023-07-10first commitMarc Vertes