Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Procedure toTokGetter.tokGet;
- Var
- I: tTokenType;
- lSetP: t_SET_CharsP;
- Begin
- If fwI > Length(fsStr) Then Begin
- fType:= t_tEOL;
- fsText:= Chr(13) + Chr(10);
- Exit;
- End;
- fType:= t_tUnKnown;
- fwBegI:= fwI;
- For I:= t_tNone To t_tIdent Do With crBaseTokens[I] Do Begin
- lSetP:= fSetP;
- If lSetP = Nil Then Continue;
- If lSetP^ = c_SET_IdentStartChars Then lSetP:= @c_SET_IdentChars;
- Self.fType:= I;
- If fsStr[fwI] In lSetP^ Then Begin
- If Not (I In c_SET_TokGetAllTypes) Then Begin
- Inc(fwI);
- Break;
- End;
- While fsStr[fwI] In lSetP^ Do Inc(fwI);
- Self.fsText:= Copy(fsStr, fwBegI, fwI - fwBegI);
- If I = t_tValue Then Self.fValue:= sdwStrTo(Self.fsText);
- Break;
- End;
- End;
- End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement