Add string type support: literals, concatenation, println, and if eval

- Implement string literal tokenization and parsing (lexer + parser)
- Add string concatenation with + operator in evaluator
- Add println keyword for printing with newline
- Add NODE_IF evaluation in VM
- Fix null terminator bug in string concat buffer
This commit is contained in:
Jose Luis Montañes Ojados
2026-02-16 17:39:52 +01:00
parent 667e5564b8
commit dd67537598
6 changed files with 88 additions and 10 deletions

12
projects/str.j Normal file
View File

@@ -0,0 +1,12 @@
x = 0
while x < 10:
x = x + 1
if x > 9:
println "fin"
x = "a"
y = x * 1
z = y + 2
println "a" + z

3
projects/test.j Normal file
View File

@@ -0,0 +1,3 @@
x = 5
z = x > 2
print x + z