Merge pull request #7375 from thetarnav/remove-inline-keywords-core-odin

Remove `inline` and `no_inline` keywords from `core:odin`
This commit is contained in:
Jeroen van Rijn
2026-08-18 19:03:00 +02:00
committed by GitHub
2 changed files with 1 additions and 20 deletions

View File

@@ -1384,15 +1384,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,
@@ -2311,10 +2304,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":
@@ -2542,10 +2531,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",
"",
}