Files
mgmt/lang/interpret_test/TestAstFunc2/lexer-parser0.txtar
James Shubin 233625db20 lang: parser: Lexer should allow in keyword as a variable name
We move it downwards to allow this case. Whether we want to allow this
long-term or not is to be decided.
2023-11-04 14:37:19 -04:00

17 lines
288 B
Plaintext

-- main.mcl --
import "fmt"
$map = 55
$fn = func($in) { # in is a special keyword
13
}
test fmt.printf("%d", $fn(0)) {}
func fn($in) { # in is a special keyword
42 + $map
}
test fmt.printf("%d", $fn(0)) {}
test fmt.printf("%d", fn(0)) {}
-- OUTPUT --
Vertex: test[13]
Vertex: test[97]