diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-09-14 21:00:45 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-09-14 21:00:45 +0100 |
commit | d8b4d6c9de8324dfa56933c2bc95694254cb736d (patch) | |
tree | 0159cd099aba72c931eb832baa0bb932a1c6cf32 /gcc/m2 | |
parent | fd948fd846c7de29150872e43b63bf9128da5b8f (diff) | |
download | gcc-d8b4d6c9de8324dfa56933c2bc95694254cb736d.zip gcc-d8b4d6c9de8324dfa56933c2bc95694254cb736d.tar.gz gcc-d8b4d6c9de8324dfa56933c2bc95694254cb736d.tar.bz2 |
modula2: Add missing comments to M2CaseList.mod and add testcases
This patch adds procedure block comments to M2CaseList.mod, changes
date values to use unique digits and add a new test case.
gcc/m2/ChangeLog:
* gm2-compiler/M2CaseList.mod (NewRanges): Add block
comment.
(NewSet): Add block comment.
(DisplayRanges): Add block comment.
(IncludeElement): Add block comment.
(IncludeElements): Add block comment.
(appendString): Add block comment.
(appendEnum): Add block comment.
(appendTree): Add block comment.
(SubrangeErrors): Add block comment.
gcc/testsuite/ChangeLog:
* gm2/switches/case/fail/subrangecase.mod: Replace 19
with 17.
* gm2/switches/case/fail/subrangecase2.mod: Ditto.
* gm2/switches/case/fail/subrangecase3.mod: Ditto.
* gm2/switches/case/fail/subrangecase4.mod: Ditto.
* gm2/switches/case/pass/subrangecase.mod: Ditto.
* gm2/switches/case/pass/subrangecase2.mod: Ditto.
* gm2/switches/case/pass/subrangecase3.mod: Ditto.
* gm2/switches/case/pass/subrangecase4.mod: Ditto.
* gm2/switches/case/fail/calendar.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/m2')
-rw-r--r-- | gcc/m2/gm2-compiler/M2CaseList.mod | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/m2/gm2-compiler/M2CaseList.mod b/gcc/m2/gm2-compiler/M2CaseList.mod index 910fcc6..b7155e3 100644 --- a/gcc/m2/gm2-compiler/M2CaseList.mod +++ b/gcc/m2/gm2-compiler/M2CaseList.mod @@ -511,7 +511,7 @@ END OverlappingCaseBounds ; (* - NewRanges - + NewRanges - return a new range from the freelist or heap. *) PROCEDURE NewRanges () : SetRange ; @@ -531,7 +531,8 @@ END NewRanges ; (* - NewSet - + NewSet - returns a new set based on type with the low and high fields assigned + to the min and max values for the type. *) PROCEDURE NewSet (type: CARDINAL) : SetRange ; @@ -549,7 +550,7 @@ END NewSet ; (* - DisposeRanges - + DisposeRanges - place set and its list onto the free list. *) PROCEDURE DisposeRanges (set: SetRange) : SetRange ; @@ -737,7 +738,7 @@ VAR (* - IncludeElement - + IncludeElement - only include enumeration field into errorString if it lies between low..high. *) PROCEDURE IncludeElement (enumList: List; field: CARDINAL; low, high: Tree) ; @@ -756,7 +757,7 @@ END IncludeElement ; (* - IncludeElements - + IncludeElements - only include enumeration field values low..high in errorString. *) PROCEDURE IncludeElements (type: CARDINAL; enumList: List; low, high: Tree) ; @@ -776,7 +777,7 @@ END IncludeElements ; (* - ErrorRangeEnum + ErrorRangeEnum - include enumeration fields Low to High in errorString. *) PROCEDURE ErrorRangeEnum (type: CARDINAL; set: SetRange; enumList: List) ; @@ -824,7 +825,7 @@ END ErrorRanges ; (* - appendString - + appendString - appends str to errorString. *) PROCEDURE appendString (str: String) ; @@ -834,7 +835,7 @@ END appendString ; (* - appendEnum - + appendEnum - appends enum to errorString. *) PROCEDURE appendEnum (enum: CARDINAL) ; @@ -844,7 +845,7 @@ END appendEnum ; (* - appendStr - + appendStr - appends str to errorString. *) PROCEDURE appendStr (str: ARRAY OF CHAR) ; @@ -953,7 +954,8 @@ END isPrintableChar ; (* - appendTree - + appendTree - append tree value to the errorString. It attempts to pretty print + CHAR constants and will fall back to CHR (x) if necessary. *) PROCEDURE appendTree (value: Tree; type: CARDINAL) ; @@ -984,7 +986,7 @@ END appendTree ; (* - SubrangeErrors - + SubrangeErrors - create an errorString containing all set ranges. *) PROCEDURE SubrangeErrors (subrangetype: CARDINAL; set: SetRange) ; |