This module contains a parser, which is able to parse the liva programming language.
For now this means we generate a intermediate representation, generated with the help of nom
,
so this is kind of a mix between a lexer and parser.
Lua directly emits the opcodes to the VM while parsing. We dont do this cause we like the decoupling of the parser from the VM. When perfomance become critical/present, this may change.
- Comments
- Literals:
- Num
- String
- Bool
- Array
- Map
- Nil
- Variable Names
- Expressions:
- Statements:
- For loop
- While loop
- If(/Else) // TODO: ELSE
- Declarations:
- Classes
- Functions
- Assignment
- Return
- Import
- Keep track of line number and line span
- Type annotations
- Annonymus functios?
- TODO: Create automated running of the parser for a folder full of source files, they should all running and return a valid and complete liva ast
print(":")
pritn("!")