Explorar el Código

cmLex.h/.c: Added cmLexFilterFlags() and cmLexSetFilterFlags().

master
kevin hace 11 años
padre
commit
3c807d08c9
Se han modificado 2 ficheros con 18 adiciones y 0 borrados
  1. 12
    0
      cmLex.c
  2. 6
    0
      cmLex.h

+ 12
- 0
cmLex.c Ver fichero

637
   return _cmLexInstallMatcher( p, id, NULL, NULL, userPtr );
637
   return _cmLexInstallMatcher( p, id, NULL, NULL, userPtr );
638
 }
638
 }
639
 
639
 
640
+unsigned           cmLexFilterFlags( cmLexH h )
641
+{
642
+  cmLex* p = _cmLexHandleToPtr(h);
643
+  return p->flags;
644
+}
645
+
646
+void               cmLexSetFilterFlags( cmLexH h, unsigned flags )
647
+{
648
+  cmLex* p = _cmLexHandleToPtr(h);
649
+  p->flags = flags;
650
+}
651
+
640
 
652
 
641
 unsigned           cmLexGetNextToken( cmLexH h )
653
 unsigned           cmLexGetNextToken( cmLexH h )
642
 {
654
 {

+ 6
- 0
cmLex.h Ver fichero

84
 
84
 
85
 cmRC_t             cmLexRegisterMatcher( cmLexH h, unsigned id, cmLexUserMatcherPtr_t funcPtr );
85
 cmRC_t             cmLexRegisterMatcher( cmLexH h, unsigned id, cmLexUserMatcherPtr_t funcPtr );
86
 
86
 
87
+// Get and set the lexer filter flags kReturnXXXLexFl.
88
+// These flags can be safely enabled and disabled between
89
+// calls to cmLexGetNextToken().
90
+unsigned           cmLexFilterFlags( cmLexH h );
91
+void               cmLexSetFilterFlags( cmLexH h, unsigned flags );
92
+
87
 // Return the type id of the current token and advances to the next token
93
 // Return the type id of the current token and advances to the next token
88
 unsigned           cmLexGetNextToken( cmLexH h );
94
 unsigned           cmLexGetNextToken( cmLexH h );
89
 
95
 

Loading…
Cancelar
Guardar