Commit Graph
2 Commits
Author SHA1 Message Date
Bob Nystrom 643a7c4f97 feat: add logical OR operator with short-circuit evaluation and token support
Add TOKEN_PIPEPIPE token for '||' syntax, implement or() parsing function with CODE_OR bytecode, and add VM interpreter logic that short-circuits on truthy left operand. Update .gitignore to exclude *.xccheckout files, extend test coverage for falsy behavior in and.wren and if.wren, and add comprehensive or.wren test suite verifying short-circuit semantics and truthiness rules.
2013-11-20 02:24:58 +00:00
Bob Nystrom f69250f217 feat: add initial project scaffold with lexer, parser, tokenizer, and example source
Add the foundational source files for the Wren language implementation including the lexer (src/lexer.c, src/lexer.h), parser (src/parser.c, src/parser.h), token management (src/token.c, src/token.h), main entry point (src/main.c), a man page (src/wren.1), a .gitignore for build and Xcode artifacts, and a minimal example script (example/hello.wren). The lexer handles single-character tokens, names, numbers, strings, whitespace, and indentation; the parser implements a Pratt-style precedence climbing parser for expressions, blocks, and variable declarations; the token module provides doubly-linked list token storage and buffer management.
2013-10-22 18:22:22 +00:00