Remove inline and no_inline keywords from core:odin

Odin uses `#force_inline` and `#force_no_inline` directives, not
keywords.
The cpp parser does not define them as keywords:
/home/thetarnav/Projects/odin/src/tokenizer.cpp:86
Nor does the grammar spec: https://odin-lang.org/spec/grammar/#keywords
This commit is contained in:
thetarnav
2026-08-18 18:25:22 +02:00
parent 8412dc37aa
commit f1bbd8fe49
2 changed files with 1 additions and 20 deletions

View File

@@ -1383,15 +1383,8 @@ parse_unrolled_for_loop :: proc(p: ^Parser, inline_tok: tokenizer.Token) -> ^ast
parse_stmt :: proc(p: ^Parser) -> ^ast.Stmt {
#partial switch p.curr_tok.kind {
case .Inline:
if peek_token_kind(p, .For) {
inline_tok := expect_token(p, .Inline)
return parse_unrolled_for_loop(p, inline_tok)
}
fallthrough
// Operands
case .No_Inline,
.Context, // Also allows for 'context = '
case .Context, // Also allows for 'context = '
.Proc,
.Ident,
.Integer, .Float, .Imag,
@@ -2310,10 +2303,6 @@ parse_inlining_or_tailing_operand :: proc(p: ^Parser, lhs: bool, tok: tokenizer.
pi := ast.Proc_Inlining.None
pt := ast.Proc_Tailing.None
#partial switch tok.kind {
case .Inline:
pi = .Inline
case .No_Inline:
pi = .No_Inline
case .Ident:
switch tok.text {
case "force_inline":
@@ -2541,10 +2530,6 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
return te
}
case .Inline, .No_Inline:
tok := advance_token(p)
return parse_inlining_or_tailing_operand(p, lhs, tok)
case .Proc:
tok := expect_token(p, .Proc)

View File

@@ -154,8 +154,6 @@ Token_Kind :: enum u32 {
Or_Break, // or_break
Or_Continue, // or_continue
Asm, // asm
Inline, // inline
No_Inline, // no_inline
Matrix, // matrix
B_Keyword_End,
@@ -291,8 +289,6 @@ tokens := [Token_Kind.COUNT]string {
"or_break",
"or_continue",
"asm",
"inline",
"no_inline",
"matrix",
"",
}