Ignore:
Timestamp:
Oct 22, 2010, 11:34:06 AM (14 years ago)
Author:
george
Message:
  • Modified: Parsing type restructured.
  • Added: Partial subrange typ parsing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Compiler/Analyze/UParser.pas

    r77 r78  
    5858    function IsIdentificator(Text: string): boolean;
    5959    function IsKeyword(Text: string): boolean;
     60    function IsString(Text: string): Boolean;
    6061    function IsOperator(Text: string): boolean;
    61     function ReadCode: string;
     62    function ReadToken: string;
    6263    function NextToken: string;
    6364    function NextTokenType: TTokenType;
     
    9798    // Recovery: try to find nearest same code
    9899    while (NextToken <> Code) and (NextTokenType <> ttEndOfFile) do
    99       ReadCode;
    100   end;
    101   ReadCode;
     100      ReadToken;
     101  end;
     102  ReadToken;
    102103end;
    103104
     
    141142    if Keywords[I] = Text then
    142143      Result := True;
     144end;
     145
     146function TBaseParser.IsString(Text: string): Boolean;
     147begin
     148
    143149end;
    144150
     
    364370end;
    365371
    366 function TBaseParser.ReadCode: string;
     372function TBaseParser.ReadToken: string;
    367373begin
    368374  if TokenIndex < Tokens.Count then begin
Note: See TracChangeset for help on using the changeset viewer.