Add // line comments, grouped parentheses, and NODE_NOP

- Parse // comments in parse_statement by consuming tokens until newline
- Add NODE_NOP for no-op statements (comments)
- Support grouped expressions with parentheses in parse_term
This commit is contained in:
Jose Luis Montañes Ojados
2026-02-16 22:41:52 +01:00
parent 21efb0563b
commit 2c91cbb561
4 changed files with 33 additions and 19 deletions

5
projects/comment.j Normal file
View File

@@ -0,0 +1,5 @@
// Esto es un comentario
println("Hello World!")
// Otro comentario mas
println(40)

View File

@@ -1,2 +1,3 @@
x = "Hello"
println(len(x) + 3)
y = 2 * (4 - 2)
println(y)