fixed issue #29 (Trap on constant definition)

This commit is contained in:
AntKrotov authored and GitHub committed 2025-06-04 16:05:10 +03:00
1 parent 752d819c1e
commit e224bc0772
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
(*
BSD 2-Clause License
Copyright (c) 2018-2023, Anton Krotov
Copyright (c) 2018-2023, 2025 Anton Krotov
All rights reserved.
*)
@@ -222,7 +222,7 @@ BEGIN
C.Ln;
C.String("Akron Oberon Compiler v"); C.Int(UTILS.vMajor); C.String("."); C.Int2(UTILS.vMinor);
C.String(" ("); C.Int(UTILS.bit_depth); C.StringLn("-bit) " + UTILS.Date);
C.StringLn("Copyright (c) 2018-2023, Anton Krotov");
C.StringLn("Copyright (c) 2018-2025, Anton Krotov");
IF inname = "" THEN
C.Ln;
+2 -2
View File
@@ -1,7 +1,7 @@
(*
BSD 2-Clause License
Copyright (c) 2018-2022, Anton Krotov
Copyright (c) 2018-2022, 2025 Anton Krotov
All rights reserved.
*)
@@ -391,7 +391,7 @@ BEGIN
parser.constexp := TRUE;
parser.expression(parser, e);
parser.constexp := FALSE;
check(e.obj = eCONST, pos, 62);
check((e.obj = eCONST) & (e._type # PROG.program.stTypes.tNIL), pos, 62);
v := e.value
END ConstExpression;
+3 -3
View File
@@ -1,7 +1,7 @@
(*
BSD 2-Clause License
Copyright (c) 2018-2023, Anton Krotov
Copyright (c) 2018-2023, 2025 Anton Krotov
All rights reserved.
*)
@@ -23,8 +23,8 @@ CONST
max32* = 2147483647;
vMajor* = 1;
vMinor* = 66;
Date* = "10-feb-2023";
vMinor* = 67;
Date* = "04-jun-2025";
FILE_EXT* = ".ob07";
RTL_NAME* = "RTL";