4 Commits

Author SHA1 Message Date
12e95ed822 Remove BinOpType::Not from ast
- Impl. Display for BinOpType & UnOpType
- Impl. scuffed Display for Ast that just uses Debug pretty print
2021-12-29 02:22:03 +01:00
1712dac6d6 Impl. more expr types in parser
- Impl. unary bool not "!"
- Impl. relational exprs (">", ">=", "<", "<=")
- Impl. equality exprs ("==", "!=")
- Impl. bool and, or, xor ("&&", "||", "^^")
- Changed bool xor lexing from "^" to "^^" in order to keep "^"
  reserved for bitwise xor
- Prepared Ast for if, while & fn_def statements
2021-12-28 23:59:10 +01:00
cfc585426d Add comments & small additions
- Added more & better comments for `token.rs`, `lexer.rs`, `parser.rs`
- Implemented HashTag Token for Lexer
- Implemented additional safety checks for the Lexer::read functions
2021-12-28 20:43:24 +01:00
623fa71355 Add simple and very rough interpreter
- Implemented an interpreter that
  - Only works with int64 values
  - Executes maths expressions
  - Declares and assigns variables in global table
  - Can use variables in expressions
  - Debug prints expression only statements
  - Can NOT use, or declare functions
2021-12-24 02:25:27 +01:00