Implemented const keyword

This commit is contained in:
Eduard Urbach 2025-02-15 14:38:01 +01:00
parent 5f37a9e84a
commit 91a3ec9d52
Signed by: eduard
GPG key ID: 49226B848C78F6C8
21 changed files with 164 additions and 26 deletions

12
tests/programs/const.q Normal file
View file

@ -0,0 +1,12 @@
const num {
one 1
two 2
three 3
}
main() {
assert num.one == 1
assert num.two == 2
assert num.three == 3
assert num.one + num.two == num.three
}

View file

@ -31,6 +31,7 @@ var programs = []struct {
{"binary", "", "", 0},
{"octal", "", "", 0},
{"hexadecimal", "", "", 0},
{"const", "", "", 0},
{"array", "", "", 0},
{"escape-rune", "", "", 0},
{"escape-string", "", "", 0},