mirror of https://gitlab.com/basile.b/dexed.git
sxsyn, BinLiteral and HexLiteral underscore cant be directly after prefix
This commit is contained in:
parent
e4fad338e0
commit
959e20d137
|
@ -525,6 +525,8 @@ begin
|
|||
end;
|
||||
|
||||
procedure TSynSxSyn.lexHexLiteral();
|
||||
var
|
||||
firstChar: Boolean = false;
|
||||
begin
|
||||
fTokStop += 2;
|
||||
fTokKind:=TTokenKind.tkNumbr;
|
||||
|
@ -533,7 +535,10 @@ begin
|
|||
case fLineBuf[fTokStop] of
|
||||
'0'..'9', 'a'..'f', 'A'..'F', '_':
|
||||
begin
|
||||
if not firstChar and (fLineBuf[fTokStop] = '_') then
|
||||
fTokKind:=TTokenKind.tkError;
|
||||
fTokStop += 1;
|
||||
firstChar := true;
|
||||
continue;
|
||||
end
|
||||
else while (fTokStop <= fLineBuf.length) and
|
||||
|
@ -548,6 +553,8 @@ begin
|
|||
end;
|
||||
|
||||
procedure TSynSxSyn.lexBinLiteral();
|
||||
var
|
||||
firstChar: Boolean = false;
|
||||
begin
|
||||
fTokStop += 2;
|
||||
fTokKind:=TTokenKind.tkNumbr;
|
||||
|
@ -556,7 +563,10 @@ begin
|
|||
case fLineBuf[fTokStop] of
|
||||
'0', '1', '_':
|
||||
begin
|
||||
if not firstChar and (fLineBuf[fTokStop] = '_') then
|
||||
fTokKind:=TTokenKind.tkError;
|
||||
fTokStop += 1;
|
||||
firstChar := true;
|
||||
continue;
|
||||
end;
|
||||
else while (fTokStop <= fLineBuf.length) and
|
||||
|
|
Loading…
Reference in New Issue