mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-02-11 07:30:24 +00:00
Parse _DecimalN keywords as (unsupported) type specifiers.
This gives a clearer error message when they are used and helps to keep the subsequent parsing on track.
This commit is contained in:
parent
f125a6640c
commit
1e415aadd7
11
Parser.pas
11
Parser.pas
@ -3270,6 +3270,15 @@ while token.kind in allowedTokens do begin
|
||||
NextToken;
|
||||
end;
|
||||
|
||||
_Decimal32sy,_Decimal64sy,_Decimal128sy: begin
|
||||
Error(190);
|
||||
if not typeDone then begin
|
||||
myTypeSpec := doublePtr;
|
||||
typeDone := true;
|
||||
end; {if}
|
||||
NextToken;
|
||||
end;
|
||||
|
||||
enumsy: begin {enum}
|
||||
if typeDone or (typeSpecifiers <> []) then
|
||||
Error(badNextTokenError)
|
||||
@ -4748,7 +4757,7 @@ anonNumber := 0; {no anonymous structs/unions yet}
|
||||
typeSpecifierStart :=
|
||||
[voidsy,charsy,shortsy,intsy,longsy,floatsy,doublesy,signedsy,unsignedsy,
|
||||
extendedsy,compsy,_Boolsy,boolsy,_Complexsy,_Imaginarysy,_Atomicsy,
|
||||
structsy,unionsy,enumsy,typedef];
|
||||
_Decimal32sy,_Decimal64sy,_Decimal128sy,structsy,unionsy,enumsy,typedef];
|
||||
|
||||
storageClassSpecifiers :=
|
||||
[typedefsy,externsy,staticsy,_Thread_localsy,thread_localsy,autosy,registersy];
|
||||
|
@ -819,6 +819,7 @@ if list or (numErr <> 0) then begin
|
||||
187: msg := @'expression has incomplete struct or union type';
|
||||
188: msg := @'local variable used in asm statement is out of range for addressing mode';
|
||||
189: msg := @'malformed numeric constant';
|
||||
190: msg := @'decimal floating types are not supported by ORCA/C';
|
||||
end; {case}
|
||||
if extraStr <> nil then begin
|
||||
extraStr^ := concat(msg^,extraStr^);
|
||||
|
Loading…
x
Reference in New Issue
Block a user