class
ISpecialBlockThis is a special kind of block that can process every line individually, and that uses its own end keywords.
Unlike IBlock objects, ISpecialBlock cannot have its own parsers. Also, ISpecialBlock does not end when the 'end' keyword is reached; instead, the end keyword must be specified in the FormatParser::
A good example of the use of special blocks are conditionals: in the ISpecialBlock::
Base classes
Constructors, destructors, conversion operators
- ~ISpecialBlock() virtual
Public functions
- auto SetData(FormatParser* pFormatParser, void* pData) -> void override
- Sets the data and FormatParser of this parser.
- auto OnLine(LexerString& lineText) -> bool pure virtual
- A method caled every time a line is read inside this block.
- auto OnEndReached(int) -> void pure virtual
- Method called when an end keyword is reached.
Function documentation
void ArgScript:: ISpecialBlock:: SetData(FormatParser* pFormatParser,
void* pData) override
Sets the data and FormatParser of this parser.
This method is called when FormatParser::
bool ArgScript:: ISpecialBlock:: OnLine(LexerString& lineText) pure virtual
A method caled every time a line is read inside this block.
Parameters | |
---|---|
lineText | The text of the line. |
Returns | Whether the line was processed or not. |
If the method returns true, the line will be considered processed and it won't be parsed like it normally would.
void ArgScript:: ISpecialBlock:: OnEndReached(int) pure virtual
Method called when an end keyword is reached.
For special blocks, end keywords are not 'end'; instead, they must be explictly specified using the FormatParser::