Golang implementation of linting PDXScript files for Crusader Kings 3
It is composed of three parts:
- lexer (tokenizer)
- parser (LL(1) parser)
linternot updated yet
Lexer creates stream of tokens that is consumed by parser, catches lexical errors, like unknown tokens (e.g. you can't write !=
)
Parser makes AST (Abstract Syntax Tree), catches syntax errors (e.g. not closed curly brace)
- Implement Lexer
- Add tests on Lexer
- Implement Parser
- Update Linter
- Add tests on Parser
- Make a VSCode extension
If you have zero knowledge in parsing, I recommend watch this playlist first: Building a Parser from scratch
Then you can read first 2-3 chapters of Compilers: Principles, Techniques, and Tools