This 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::
- ~ISpecialBlock() virtual
- void SetData(FormatParser* pFormatParser, void* pData) 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.
- void OnEndReached(int) pure virtual
- Method called when an end keyword is reached.
ISpecialBlock:: OnLine(LexerString& lineText) pure virtual
A method caled every time a line is read inside this block.
|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.