cmLex.h/.c: Added cmLexFilterFlags() and cmLexSetFilterFlags().
This commit is contained in:
parent
9b9e626287
commit
3c807d08c9
12
cmLex.c
12
cmLex.c
@ -637,6 +637,18 @@ cmRC_t cmLexRegisterMatcher( cmLexH h, unsigned id, cmLexUserMatcher
|
|||||||
return _cmLexInstallMatcher( p, id, NULL, NULL, userPtr );
|
return _cmLexInstallMatcher( p, id, NULL, NULL, userPtr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned cmLexFilterFlags( cmLexH h )
|
||||||
|
{
|
||||||
|
cmLex* p = _cmLexHandleToPtr(h);
|
||||||
|
return p->flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmLexSetFilterFlags( cmLexH h, unsigned flags )
|
||||||
|
{
|
||||||
|
cmLex* p = _cmLexHandleToPtr(h);
|
||||||
|
p->flags = flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned cmLexGetNextToken( cmLexH h )
|
unsigned cmLexGetNextToken( cmLexH h )
|
||||||
{
|
{
|
||||||
|
6
cmLex.h
6
cmLex.h
@ -84,6 +84,12 @@ typedef unsigned (*cmLexUserMatcherPtr_t)( const cmChar_t* cp, unsigned cn );
|
|||||||
|
|
||||||
cmRC_t cmLexRegisterMatcher( cmLexH h, unsigned id, cmLexUserMatcherPtr_t funcPtr );
|
cmRC_t cmLexRegisterMatcher( cmLexH h, unsigned id, cmLexUserMatcherPtr_t funcPtr );
|
||||||
|
|
||||||
|
// Get and set the lexer filter flags kReturnXXXLexFl.
|
||||||
|
// These flags can be safely enabled and disabled between
|
||||||
|
// calls to cmLexGetNextToken().
|
||||||
|
unsigned cmLexFilterFlags( cmLexH h );
|
||||||
|
void cmLexSetFilterFlags( cmLexH h, unsigned flags );
|
||||||
|
|
||||||
// Return the type id of the current token and advances to the next token
|
// Return the type id of the current token and advances to the next token
|
||||||
unsigned cmLexGetNextToken( cmLexH h );
|
unsigned cmLexGetNextToken( cmLexH h );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user