diff --git a/hblang/examples/arithmetic.hb b/hblang/examples/arithmetic.hb new file mode 100644 index 00000000..52394e6c --- /dev/null +++ b/hblang/examples/arithmetic.hb @@ -0,0 +1,3 @@ +main := ||: int { + return 10 - 20 / 2 + 4 * (2 + 2) - 4 * 4; +} diff --git a/hblang/src/lexer.rs b/hblang/src/lexer.rs index 54f41707..490db405 100644 --- a/hblang/src/lexer.rs +++ b/hblang/src/lexer.rs @@ -163,5 +163,6 @@ mod tests { empty => ""; whitespace => " \t\n\r"; example => include_str!("../examples/main_fn.hb"); + arithmetic => include_str!("../examples/arithmetic.hb"); } }