diff options
author | ben_albrecht <devnull@localhost> | 2016-09-15 15:59:50 -0700 |
---|---|---|
committer | ben_albrecht <devnull@localhost> | 2016-09-15 15:59:50 -0700 |
commit | 30fd40bdaf34f42f996fd65949217ea93628677f (patch) | |
tree | c6540122786c8fef829be9687b1857bfe4b58730 /pygments/lexers/chapel.py | |
parent | c0f5f2755b3e6134b07abfd37feed5b93603152b (diff) | |
download | pygments-30fd40bdaf34f42f996fd65949217ea93628677f.tar.gz |
Better regex for procedures (no false positives)
Diffstat (limited to 'pygments/lexers/chapel.py')
-rw-r--r-- | pygments/lexers/chapel.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/chapel.py b/pygments/lexers/chapel.py index a24a77d0..5bbad431 100644 --- a/pygments/lexers/chapel.py +++ b/pygments/lexers/chapel.py @@ -52,7 +52,7 @@ class ChapelLexer(RegexLexer): 'then', 'use', 'when', 'where', 'while', 'with', 'yield', 'zip'), suffix=r'\b'), Keyword), - (r'(proc)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'procname'), + (r'proc\s+)', bygroups(Keyword, Text), 'procname'), (r'(class|module|record|union)(\s+)', bygroups(Keyword, Text), 'classname'), @@ -96,6 +96,6 @@ class ChapelLexer(RegexLexer): (r'[a-zA-Z_][\w$]*', Name.Class, '#pop'), ], 'procname': [ - (r'[\+\-\*\/\!\~\%\<\>\=\&\^\|a-zA-Z]*', Name.Function, '#pop'), + (r'(\w+|\~\w+|[+*/!~%<>=&^|\-]{0,2}|)', Name.Function, '#pop'), ], } |