parent
a108be50c7
commit
a6adf2006e
|
@ -57,7 +57,7 @@ class CGrammar(Grammar):
|
||||||
r'identifier', r'[a-zA-Z_][a-zA-Z0-9_]*'),
|
r'identifier', r'[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||||
|
|
||||||
PatternRule(r'function', r'[a-zA-Z_][a-zA-Z0-9_]*(?= *\()'),
|
PatternRule(r'function', r'[a-zA-Z_][a-zA-Z0-9_]*(?= *\()'),
|
||||||
PatternRule(r'constant', r"[A-Z_][A-Z0-9_]+"),
|
PatternRule(r'constant', r"[A-Z_][A-Z0-9_]+(?![a-zA-Z0-9_])"),
|
||||||
PatternRule(r'label', r'[a-zA-Z_][a-zA-Z0-9_]*(?=:)'),
|
PatternRule(r'label', r'[a-zA-Z_][a-zA-Z0-9_]*(?=:)'),
|
||||||
RegionRule(r'error', r'# *error', ErrorGrammar, r'\n$'),
|
RegionRule(r'error', r'# *error', ErrorGrammar, r'\n$'),
|
||||||
RegionRule(r'macro', r'# *(?:assert|cpu|define|elif|else|endif|error|ident|ifdef|ifndef|if|import|include_next|line|machine|pragma_once|pragma|system|unassert|undef|warning)(?!=[a-zA-Z0-9_])', MacroGrammar, r'\n$'),
|
RegionRule(r'macro', r'# *(?:assert|cpu|define|elif|else|endif|error|ident|ifdef|ifndef|if|import|include_next|line|machine|pragma_once|pragma|system|unassert|undef|warning)(?!=[a-zA-Z0-9_])', MacroGrammar, r'\n$'),
|
||||||
|
|
Loading…
Reference in New Issue