Add #warning(<string>) builtin compile time procedure

This commit is contained in:
gingerBill
2024-06-20 15:32:30 +01:00
parent 94a8c38d86
commit dab3c832e0
3 changed files with 22 additions and 2 deletions

View File

@@ -1438,7 +1438,7 @@ parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
case: error(p, stmt.pos, "#partial can only be applied to a switch statement")
}
return stmt
case "assert", "panic":
case "assert", "panic", "warning":
bd := ast.new(ast.Basic_Directive, tok.pos, end_pos(tag))
bd.tok = tok
bd.name = name