From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- tiger-compiler/tests/syntax/constant_redefinition.tig | 2 ++ tiger-compiler/tests/syntax/typeid.tig | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 tiger-compiler/tests/syntax/constant_redefinition.tig create mode 100644 tiger-compiler/tests/syntax/typeid.tig (limited to 'tiger-compiler/tests/syntax') 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 -- cgit v1.2.3