Allow function calls in expressions and add len() built-in

- Parse function calls in parse_term() so they work inside expressions
  (e.g. z = len(x), y = len(x) + 1)
- Add len() built-in for string length in evaluator
This commit is contained in:
Jose Luis Montañes Ojados
2026-02-16 18:31:39 +01:00
parent a36e52a9c3
commit 21efb0563b
3 changed files with 40 additions and 12 deletions

View File

@@ -1,11 +1,2 @@
x = "Hello world!"
y = 21
println()
println(x)
print("y=")
println(y)
dummy()
if y > 1:
println("OK!")
x = "Hello"
println(len(x) + 3)