Implemented const keyword
This commit is contained in:
parent
5f37a9e84a
commit
91a3ec9d52
21 changed files with 164 additions and 26 deletions
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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue