All tests pass. Here's a summary of the changes:
Problem: INT INLINE FUNCTION seconds(VAL INT s) caused parse error expected :, got FUNCTION because the parser didn't recognize INLINE between the return type and FUNCTION.
Fix (3 files):
-
lexer/token.go — Added INLINE as a keyword token so it's recognized instead of being treated as an identifier.
-
parser/parser.go — Two changes:
parseStatement(): Added p.peekTokenIs(lexer.INLINE) to the condition that routes type keywords to parseFuncDecl() (line 169)
-
parseFuncDecl(): Added a check to skip the INLINE token if present before consuming the FUNCTION keyword
-
parser/parser_test.go — Added two new tests:
TestInlineFuncDecl — VALOF form with INT INLINE FUNCTION
TestInlineFuncDeclIS — IS form with INT INLINE FUNCTION
Documentation updated: TODO.md and CLAUDE.md both updated to reflect the new feature.
The INLINE modifier is purely an optimization hint and is ignored for transpilation — the function is parsed and generated exactly as if INLINE were absent, as agreed in the issue discussion.