Asama 1.1 — Implement REPL mode (saqut without arguments) #39

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

Goal: Running saqut without arguments enters an interactive REPL loop.

Files to create/modify:

  • src/cli/repl.hpp (new)
  • src/main.cpp

Requirements:

  • REPL prompt: >
  • Each line is parsed, evaluated, and the result printed.
  • .ast command prints the AST of the last expression.
  • .tokens command prints the token list.
  • .symbols command prints the current symbol table.
  • .exit or .quit exits.
  • Multi-line input: when a block is started ({), keep reading until }.

Success criteria:

  • ./saqut launches REPL.
  • .ast, .tokens, .symbols work correctly.
**Goal:** Running saqut without arguments enters an interactive REPL loop. **Files to create/modify:** - src/cli/repl.hpp (new) - src/main.cpp **Requirements:** - REPL prompt: > - Each line is parsed, evaluated, and the result printed. - .ast command prints the AST of the last expression. - .tokens command prints the token list. - .symbols command prints the current symbol table. - .exit or .quit exits. - Multi-line input: when a block is started ({), keep reading until }. **Success criteria:** - ./saqut launches REPL. - .ast, .tokens, .symbols work correctly.
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#39
No description provided.