- Add none value handling to Value::operator+ for string concatenation - Replace direct string concatenations with Value::operator+ calls in Interpreter - Add missing string+none and none+string type combinations - Standardize token literal generation in Lexer - Add ExecutionContext support across visitor pattern - Enhance error reporting integration - Add new standard library functions
18 lines
284 B
Plaintext
18 lines
284 B
Plaintext
var counter = 0;
|
|
|
|
func fib(n) {
|
|
if (n <= 1) {
|
|
return n;
|
|
}
|
|
counter++; // Only increment for recursive calls
|
|
return fib(n - 1) + fib(n - 2);
|
|
}
|
|
|
|
print("Fibonacci test:");
|
|
var fib_result = fib(30);
|
|
|
|
print("Result: " + fib_result);
|
|
|
|
print("Counter: " + counter);
|
|
|