diff --git a/hblang/examples/arithmetic.hb b/hblang/examples/arithmetic.hb new file mode 100644 index 0000000..52394e6 --- /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 54f4170..490db40 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"); } }