codetools: implemented some more c tokens

git-svn-id: trunk@14301 -
This commit is contained in:
mattias 2008-02-28 13:06:06 +00:00
parent e4cad5b120
commit cab6632f4c
2 changed files with 16 additions and 11 deletions

View File

@ -32,12 +32,16 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="1"> <Units Count="2">
<Unit0> <Unit0>
<Filename Value="h2pastest.lpr"/> <Filename Value="h2pastest.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="H2PasTest"/> <UnitName Value="H2PasTest"/>
</Unit0> </Unit0>
<Unit1>
<Filename Value="scanexamples/test.h"/>
<IsPartOfProject Value="True"/>
</Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -316,23 +316,24 @@ begin
end; end;
end; end;
end; end;
'$': // hex constant
begin
inc(Position);
while (Position<=Len)
and (IsHexNumberChar[Source[Position]]) do
inc(Position);
end;
else else
inc(Position); inc(Position);
if Position<=Len then begin if Position<=Len then begin
c2:=Source[Position]; c2:=Source[Position];
// test for double char operators :=, +=, -=, /=, *=, <>, <=, >=, **, ^^ // test for double char operators :=, +=, -=, /=, *=, !=, ==, <=, >=, **, ^^, ::
if ((c2='=') and (IsEqualOperatorStartChar[c1])) if ((c2='=') and (IsEqualOperatorStartChar[c1]))
or ((c1='<') and (c2='>')) or ((c1='=') and (c2='='))
or ((c1='.') and (c2='.')) or ((c1='!') and (c2='='))
or ((c1=':') and (c2=':'))
or ((c1='*') and (c2='*')) or ((c1='*') and (c2='*'))
or ((c1='^') and (c2='^')) or ((c1='^') and (c2='^'))
or ((c1='|') and (c2='|'))
or ((c1='&') and (c2='&'))
or ((c1='+') and (c2='+'))
or ((c1='-') and (c2='-'))
or ((c1='-') and (c2='>'))
or ((c1='>') and (c2='>'))
or ((c1='<') and (c2='<'))
then then
inc(Position); inc(Position);
end; end;