Asama 4.2 — Disable keywords based on CompilerConfig #51

Open
opened 2026-05-26 19:52:28 +03:00 by saqut · 0 comments
Owner

Goal: When a keyword is disabled in config, the Tokenizer treats it as an identifier.

Files to modify:

  • src/tokenizer/tokenizer.hpp

Requirements:

  • Tokenizer receives a CompilerConfig reference.
  • Before matching keywords, check config flags.
  • Disabled keywords are skipped and fall through to identifier.
  • Example: --disable-while means while becomes a regular identifier.

Success criteria:

  • With --disable-while, while (true) {} tokenizes while as identifier.
  • Parser does not parse it as a while statement.
**Goal:** When a keyword is disabled in config, the Tokenizer treats it as an identifier. **Files to modify:** - src/tokenizer/tokenizer.hpp **Requirements:** - Tokenizer receives a CompilerConfig reference. - Before matching keywords, check config flags. - Disabled keywords are skipped and fall through to identifier. - Example: --disable-while means while becomes a regular identifier. **Success criteria:** - With --disable-while, while (true) {} tokenizes while as identifier. - Parser does not parse it as a while statement.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: saqut/saqut-compiler#51
No description provided.