diff options
author | Georg Brandl <georg@python.org> | 2014-09-16 10:00:47 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-09-16 10:00:47 +0200 |
commit | c75b6f25aeed25ffe8658d9f37614b1069cf299c (patch) | |
tree | 7a071f6322ceae64018566337fbab4d17035c958 /pygments/lexers/web.py | |
parent | a180cc3373345b3cb0ddecf14bcc31a1a1e53d51 (diff) | |
parent | 0d9f70215c44a27ea10e4759300464873b618a10 (diff) | |
download | pygments-c75b6f25aeed25ffe8658d9f37614b1069cf299c.tar.gz |
Merged in andyli/pygments-main (pull request #391)
HaxeLexer fix
Diffstat (limited to 'pygments/lexers/web.py')
-rw-r--r-- | pygments/lexers/web.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index cd619596..0188508f 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -1611,13 +1611,18 @@ class HaxeLexer(ExtendedRegexLexer): (r'(?:extern|private)\b', Keyword.Declaration), (r'(?:abstract)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'abstract')), - (r'(?:class|interface)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'class')), + (r'(?:class|interface)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'macro-class')), (r'(?:enum)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'enum')), (r'(?:typedef)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'typedef')), default(('#pop', 'expr')), ], + 'macro-class': [ + (r'\{', Punctuation, ('#pop', 'class-body')), + include('class') + ], + # cast can be written as "cast expr" or "cast(expr, type)" 'cast': [ include('spaces'), |