- Compiler: PP → Lexer → Parser → Analyzer → Gengo pipeline - Parser: 232/236 (98%) Harbour compatibility, registry-based dispatch - RTL: 351 Harbour-compatible functions - RDD: DBF/NTX/CDX engines with Rushmore bitmap optimization - Go Interop: IMPORT + pkg.Func() + obj:Method() with FastPath (15M calls/sec) - HB_FUNC API: Full Harbour C API compatible Go bridge - Concurrency: SPAWN/LAUNCH/GOROUTINE, <-, WATCH, PARALLEL FOR, ASYNC/AWAIT - Extensions: Multi-return, DEFER, Slice, f-string, Nil-safe ?:, CONST - Macro Compiler: Runtime AST parsing and evaluation - Debugger: TUI debugger with source display, breakpoints, stepping - FRB: Native + Pcode dual mode runtime binary - Tests: 13 packages ALL PASS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
736 B
Plaintext
38 lines
736 B
Plaintext
// FRB runtime loading test
|
|
// Usage: ./test_frb (after: five frb examples/frb_module.prg -o mylib.frb)
|
|
|
|
FUNCTION Main()
|
|
LOCAL pMod
|
|
|
|
? "=== FRB Runtime Module Test ==="
|
|
? ""
|
|
|
|
// Load FRB module at runtime
|
|
? "Loading mylib.frb..."
|
|
pMod := FrbLoad("mylib.frb")
|
|
IF pMod = NIL
|
|
? "ERROR: Cannot load mylib.frb"
|
|
RETURN NIL
|
|
ENDIF
|
|
? "Loaded!"
|
|
? ""
|
|
|
|
// Call functions from loaded module
|
|
? "Calling Hello('Five'):"
|
|
? " ", FrbDo(pMod, "HELLO", "Five")
|
|
|
|
? "Calling Add(100, 200):"
|
|
? " ", FrbDo(pMod, "ADD", 100, 200)
|
|
|
|
? "Calling Factorial(10):"
|
|
? " ", FrbDo(pMod, "FACTORIAL", 10)
|
|
|
|
? ""
|
|
|
|
// Unload
|
|
FrbUnload(pMod)
|
|
? "Module unloaded."
|
|
? "=== Done ==="
|
|
|
|
RETURN NIL
|