Skip to content

Implement Falcon Runtime#11

Open
XomaDev wants to merge 105 commits into
mainfrom
runtime
Open

Implement Falcon Runtime#11
XomaDev wants to merge 105 commits into
mainfrom
runtime

Conversation

@XomaDev
Copy link
Copy Markdown
Collaborator

@XomaDev XomaDev commented Mar 21, 2026

No description provided.

XomaDev and others added 30 commits March 11, 2026 00:58
- Add REPL mode (./Falcon repl) with multi-line brace tracking and error recovery
- Rename builtins.go → deffuncs.go; extract numops.go for base conversions,
  colour, random, stats and base-format predicates (isBase10/isHex/isBinary)
- Add print.go with printLine/stub helpers; remove fmt from entire runtime package
- Merge private eval() into public Eval(); rename storedProc → Procedure
- Add evalExprs() helper and use it consistently across deffuncs/methods/interpreter
- makeDictionary now accepts any two-element list as a key-value pair, not just Pair AST nodes
- Fix + operator to be strictly numeric; string join is _ only
- Lexer: support leading-dot decimal literals (.5, .123 → 0.5, 0.123)
- App Inventor component stubs now print informative messages instead of silently returning null
- Pair evaluation returns [key, value] two-element list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d names

- AsBool() now panics on non-Bool types (no implicit number/string truthy)
- AsNum() drops Bool coercion, panics on non-numeric types
- AsStr() default falls back to String() instead of empty string
- TryNum renamed to CoerceNum across value.go, interpreter.go, methods.go, numops.go
- Internal interpreter helpers renamed for clarity (evalBinary→binary, evalIf→ifExpr, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All statement forms (if, for, while, each, eachPair, set, proc defs,
list/dict mutations, component events/property sets, println) now return
VoidVal() which panics if consumed as an expression. REPL skips printing
void results.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tions

Custom xorshift64 RNG replaces math/rand. insertionSort (stable) replaces
sort.SliceStable/sort.Slice. Hand-rolled CSV helpers replace encoding/csv.
Also renames: deffuncs→def_funcs, numops→num_helper, interpreter→runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant