diff options
Diffstat (limited to 'tiger-compiler/tests/syntax')
| -rw-r--r-- | tiger-compiler/tests/syntax/constant_redefinition.tig | 2 | ||||
| -rw-r--r-- | tiger-compiler/tests/syntax/typeid.tig | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tiger-compiler/tests/syntax/constant_redefinition.tig b/tiger-compiler/tests/syntax/constant_redefinition.tig new file mode 100644 index 0000000..125c3f7 --- /dev/null +++ b/tiger-compiler/tests/syntax/constant_redefinition.tig @@ -0,0 +1,2 @@ +/* Expressions cannot be at the left side of an asignment */ +"beak" := 15 diff --git a/tiger-compiler/tests/syntax/typeid.tig b/tiger-compiler/tests/syntax/typeid.tig new file mode 100644 index 0000000..fa0ff30 --- /dev/null +++ b/tiger-compiler/tests/syntax/typeid.tig @@ -0,0 +1,8 @@ +/* error : syntax error, nil should not be preceded by type-id. */ +let + type rectype = {name : string, id : int} + + var a := rectype nil +in + a +end |
