Commit Graph

4 Commits

Author SHA1 Message Date
Michael Schimmel b1ca16149d Add chrono dependency and example files
This commit introduces the `chrono` dependency to the project, enabling
the use of time-related functionalities. Additionally, it adds several
example files (`closure.myc`, `fib.myc`, `hof.myc`) to showcase the
language's features like closures, recursion, and higher-order
functions.

The `Cargo.lock` and `Cargo.toml` files have been updated to reflect the
new dependency. The `integration_test.rs` file now includes a test to
run all `.myc` files found in the `examples` directory, ensuring their
correctness. The `main.rs` file has also been updated to load and
display these examples in the UI.
2026-02-17 14:21:31 +01:00
Michael Schimmel 97542b5ca4 Refactor: Migrate to clap for CLI argument parsing
The project now uses the `clap` crate for handling command-line
arguments, replacing the previous manual parsing approach. This includes
adding `clap` as a dependency and creating a `Cli` struct to define the
command-line interface. The `main` function has been updated to parse
these arguments and handle file input or direct script evaluation.
2026-02-17 13:35:59 +01:00
Michael Schimmel c05c74bb65 feat: Implement lexer and parser for AST
Introduces the lexer and parser modules, enabling the conversion of
source code into an Abstract Syntax Tree (AST).

This includes:
- Defining token kinds and structures.
- Implementing lexer logic to tokenize input.
- Defining AST node kinds and structures.
- Implementing parser logic to construct the AST from tokens.
- Adding support for basic expressions, lists, keywords, and
  identifiers.
- Adding the `lazy_static` dependency for keyword interning.
- Refactoring `Value::Nil` to `Value::Void`.
2026-02-17 00:15:08 +01:00
Michael Schimmel 3fdfd01982 feat: Initialize compiler GUI project
Sets up the basic structure for the compiler GUI application using
eframe.
This includes the main application loop, a default UI layout with a
source code editor and an output log panel, and the foundational AST
(Abstract Syntax Tree) definitions for types, nodes, and an evaluation
mechanism.
2026-02-16 23:47:17 +01:00