JCL Help:TExprSimpleLexer.NextTok

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Skips the current token and gets the next token.


Pascal

 public procedure NextTok; override;


Description

This method is called by Reset (and thus implicitly by Create), so it doesn't need to be called to get the first token in the stream.
This method does the following jobs:

  • Skips whitespace
  • Determines token type from the first character after whitespace has been skipped
  • Reads in the rest of that token, based on the first character, possibly refining the token type based on further characters. For example, if '<' is read on the input stream, the token could be etLessThan, etNotEqual ('<>') or etLessEqual ('<=').

After a call to this method, CurrTok will give the current token type, and TokenAsString and TokenAsNumber will give extra information as appropriate for the token type.


About

Donator

Barry Kelly


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page