parseh recognizes C enums

This commit is contained in:
Andrew Kelley
2016-01-28 11:03:44 -07:00
parent 137bb51e20
commit 474340a003
5 changed files with 218 additions and 63 deletions

View File

@@ -93,6 +93,10 @@
case DIGIT: \
case '_'
#define SYMBOL_START \
ALPHA: \
case '_'
enum TokenizeState {
TokenizeStateStart,
TokenizeStateSymbol,
@@ -1170,3 +1174,10 @@ bool is_printable(uint8_t c) {
}
}
bool valid_symbol_starter(uint8_t c) {
switch (c) {
case SYMBOL_START:
return true;
}
return false;
}