Initial Flux language specification
Add the LL(1) context-free grammar (GRAMMAR.ebnf), token and syntax reference (SYNTAX.md), LL(1) verification tool (ll1_check.py), and a fibonacci example demonstrating the language.
This commit is contained in:
7
examples/fibonacci.flx
Normal file
7
examples/fibonacci.flx
Normal file
@@ -0,0 +1,7 @@
|
||||
fn fibonacci(n: u8) -> u64 {
|
||||
if n < 2 {
|
||||
return n;
|
||||
}
|
||||
|
||||
return fibonacci(n - 1) + fibonacci(n - 2);
|
||||
}
|
||||
Reference in New Issue
Block a user