Lugli language compiler
My 'Lugli' language compiler for learning purposes, written in rust. This language is to be a subset for other purposes, for example, a simple language to use on math problems and logical learning, but also it is a good example of how to write a compiler.
Compiler usage / commands
Run
[Executable] run <file path>
Example: Lugli.exe run foo.lg
Compiler features
- tokenizer / lexer
- parser
- runtime (compiler)
- Module system (simple creation of embed libs)
- Linker (for other languages)
- Optimizer / FMT
- Debugger tools
Language features
- Basic types
➡ String, Number, Boolean, Array, Struct - Basic operators
➡ +, -, *, /, ==, !=, >, <, >=, <=, &&, ||, ! - Basic functions
➡ console print, import files, get object type - Basic if statements
➡ if, elif, else, true, false, brackets - Basic loops
➡ for, for in, while, break
Current embed librarys
- Not yet implemented:
Lugli docs
- Not yet implemented:
Learning support from:
- https://github.com/ryangjchandler/lagoon
- https://github.com/ryangjchandler/pl
- https://www.youtube.com/playlist?list=PLX0VJHnEgHeqE06mX4m2rjlOWm_GUWOTI
License
This project is under license GPL v3, for learning purposes only.