For the folder / lexer I want to write for the TWiki Markup Language (with variations and extensions), I need to recognize strings of characters like "---+". "---++". ..., "---++++++" to increment and decrement folding levels.
In the var'aq tutorial, I see code like this:
if ( scCTX . Match ( ’* ’ , ’) ’ )) {
scCTX . Forward ();
// Move over the )
and I'm thinking that one way to look for those strings might be something like this:
if ( scCTX . Match ('-', '-', '-', '+', '+')) {
followed by a for statement or similar that moves forward 5 characters (in this case).
Questions:
* would that Match statement work?
* is there a better way?
If it makes any difference, these strings only affect folding levels if they are at the beginning of a line, but I will have other things to match that will not necessarily be at the beginning of a line--I'll probably end up asking a separate question about those.