hwdb: enable diagnostic switches

This commit is contained in:
Yu Watanabe 2020-11-27 05:59:56 +09:00
parent 4d484e14bb
commit e77fed207a
1 changed files with 7 additions and 1 deletions

View File

@ -33,7 +33,7 @@ try:
OneOrMore, Combine, Or, Optional, Suppress, Group,
nums, alphanums, printables,
stringEnd, pythonStyleComment,
ParseBaseException)
ParseBaseException, __diag__)
except ImportError:
print('pyparsing is not available')
sys.exit(77)
@ -50,6 +50,12 @@ except ImportError:
# don't do caching on old python
lru_cache = lambda: (lambda f: f)
__diag__.warn_multiple_tokens_in_named_alternation = True
__diag__.warn_ungrouped_named_tokens_in_collection = True
__diag__.warn_name_set_on_empty_Forward = True
__diag__.warn_on_multiple_string_args_to_oneof = True
__diag__.enable_debug_on_named_expressions = True
EOL = LineEnd().suppress()
EMPTYLINE = LineEnd()
COMMENTLINE = pythonStyleComment + EOL