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. squash
This commit is contained in:
7
examples/fibonacci.bky
Normal file
7
examples/fibonacci.bky
Normal 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
3
examples/hello-world.bky
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
puts("Hello, World!");
|
||||
}
|
||||
Reference in New Issue
Block a user