This commit is contained in:
mlokr 2024-07-19 14:24:58 +02:00
parent 416f646957
commit a88d3a5c9d
No known key found for this signature in database
GPG key ID: DEA147DDEE644993
3 changed files with 8 additions and 5 deletions

View file

@ -1001,7 +1001,7 @@ impl<'a> std::fmt::Display for Expr<'a> {
pub fn insert_needed_semicolon(source: &str) -> bool {
let kind = lexer::Lexer::new(source).next().kind;
kind.precedence().is_some() || matches!(kind, TokenKind::Struct | TokenKind::Tupl)
kind.precedence().is_some() || matches!(kind, TokenKind::Ctor | TokenKind::Tupl)
}
#[repr(C)]

View file

@ -1,5 +1,7 @@
.{ global, fib } := @use("pkg.hb");
foo := 0;
.{global, fib} := @use("pkg.hb")
main := fn(a: int): int {
return fib(global);
return fib(global)
}

View file

@ -1,5 +1,6 @@
global := 10;
global := 10
fib := fn(n: int): int {
return n + 1;
return n + 1
}