From a6adf2006e66bc8a7cf25ef96b66669296754191 Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 26 Mar 2009 02:50:45 +0000 Subject: [PATCH] constant bug fix --HG-- branch : pmacs2 --- mode/c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/c.py b/mode/c.py index 281c850..4bb5d2f 100644 --- a/mode/c.py +++ b/mode/c.py @@ -57,7 +57,7 @@ class CGrammar(Grammar): r'identifier', 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_]*(?=:)'), 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$'),