feat: Add token definitions and lexer logic.

This commit adds the `Token` and `TokenKind` definitions in `src/token.rs`,
in `src/lexer.rs` I've added the `Lexer` logic.
This commit is contained in:
2026-03-11 23:18:05 +01:00
parent 9e4d4085ba
commit a8a1b5b897
8 changed files with 424 additions and 6 deletions

7
examples/fibonacci.bky Normal file
View File

@@ -0,0 +1,7 @@
fn fib(n: u64) -> u64 {
if n < 2 {
return n;
}
return fib(n - 1) + fib(n - 2);
}

3
examples/hello-world.bky Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
puts("Hello, World!");
}