feat: add ++ concat operator and auto-invoke main

BUG-004: Add ++ operator for string and list concatenation across all
backends (interpreter, C, JS) with type checking and formatting support.

BUG-001: Auto-invoke top-level `let main = fn () => ...` when main is
a zero-parameter function, instead of just printing the function value.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 22:01:41 -05:00
parent bb0a288210
commit 61e1469845
9 changed files with 110 additions and 7 deletions

View File

@@ -1558,6 +1558,7 @@ impl Parser {
loop {
let op = match self.peek_kind() {
TokenKind::Plus => BinaryOp::Add,
TokenKind::PlusPlus => BinaryOp::Concat,
TokenKind::Minus => BinaryOp::Sub,
_ => break,
};