diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-02-29 14:10:25 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-02-29 14:10:25 +0100 |
commit | 515cb682ddd41a2815af4fa46ac7c17b6edbaa9d (patch) | |
tree | f767f4b17ca5907a562dd1a7b8f1952744d12718 /ecomp-c/test1.e | |
parent | 37303cd173fa0d19474439c011a9ebaefa0d1604 (diff) | |
download | compilertests-515cb682ddd41a2815af4fa46ac7c17b6edbaa9d.tar.gz compilertests-515cb682ddd41a2815af4fa46ac7c17b6edbaa9d.tar.bz2 |
added brakets for expressions
fixed parsing issues around identifier() - do not call it directly, always use getSym -
added support for enumerations of variables in declarations
Diffstat (limited to 'ecomp-c/test1.e')
-rw-r--r-- | ecomp-c/test1.e | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ecomp-c/test1.e b/ecomp-c/test1.e index b23e4fc..454794a 100644 --- a/ecomp-c/test1.e +++ b/ecomp-c/test1.e @@ -1,6 +1,7 @@ /* * module trying to show all features of the language */ + module test1; const @@ -14,7 +15,7 @@ var // this is also an integer b : integer; c : integer; // c too - d : integer; + d, e : integer; begin a := 1; @@ -23,4 +24,6 @@ begin a := b; a := a + 1; d := a * c + b; + d := a * ( c + b ); + e := ( ( 7 * a + b ) + 2 * ( b + a + 3 ) ) * 2; end |