Implemented const keyword
This commit is contained in:
12
tests/programs/const.q
Normal file
12
tests/programs/const.q
Normal 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
|
||||
}
|
@ -31,6 +31,7 @@ var programs = []struct {
|
||||
{"binary", "", "", 0},
|
||||
{"octal", "", "", 0},
|
||||
{"hexadecimal", "", "", 0},
|
||||
{"const", "", "", 0},
|
||||
{"array", "", "", 0},
|
||||
{"escape-rune", "", "", 0},
|
||||
{"escape-string", "", "", 0},
|
||||
|
Reference in New Issue
Block a user