mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-02-11 07:30:24 +00:00
Allow generation of digraphs via ## token merging.
This commit is contained in:
parent
2b062a8392
commit
26e1bfc253
32
Scanner.pas
32
Scanner.pas
@ -1324,7 +1324,7 @@ else if kind1 = dotch then begin
|
||||
end {else if class1 in numericConstants}
|
||||
|
||||
else if kind1 = poundch then begin
|
||||
if kind2 = poundch then begin
|
||||
if (kind2 = poundch) and (tk1.isDigraph = tk2.isDigraph) then begin
|
||||
tk1.kind := poundpoundop;
|
||||
goto 1;
|
||||
end; {if}
|
||||
@ -1368,6 +1368,16 @@ else if kind1 = ltch then begin
|
||||
else if kind2 = eqch then begin
|
||||
tk1.kind := lteqop;
|
||||
goto 1;
|
||||
end {else if}
|
||||
else if kind2 = colonch then begin
|
||||
tk1.kind := lbrackch;
|
||||
tk1.isDigraph := true;
|
||||
goto 1;
|
||||
end {else if}
|
||||
else if kind2 = percentch then begin
|
||||
tk1.kind := lbracech;
|
||||
tk1.isDigraph := true;
|
||||
goto 1;
|
||||
end; {else if}
|
||||
end {else if}
|
||||
|
||||
@ -1440,7 +1450,17 @@ else if kind1 = percentch then begin
|
||||
if kind2 = eqch then begin
|
||||
tk1.kind := percenteqop;
|
||||
goto 1;
|
||||
end; {if}
|
||||
end {if}
|
||||
else if kind2 = gtch then begin
|
||||
tk1.kind := rbracech;
|
||||
tk1.isDigraph := true;
|
||||
goto 1;
|
||||
end {else if}
|
||||
else if kind2 = colonch then begin
|
||||
tk1.kind := poundch;
|
||||
tk1.isDigraph := true;
|
||||
goto 1;
|
||||
end; {else if}
|
||||
end {else if}
|
||||
|
||||
else if kind1 = carotch then begin
|
||||
@ -1462,6 +1482,14 @@ else if kind1 = slashch then begin
|
||||
tk1.kind := slasheqop;
|
||||
goto 1;
|
||||
end; {if}
|
||||
end {else if}
|
||||
|
||||
else if kind1 = colonch then begin
|
||||
if kind2 = gtch then begin
|
||||
tk1.kind := rbrackch;
|
||||
tk1.isDigraph := true;
|
||||
goto 1;
|
||||
end; {if}
|
||||
end; {else if}
|
||||
|
||||
Error(63);
|
||||
|
Loading…
x
Reference in New Issue
Block a user