diff options
author | Andy Li <andy@onthewings.net> | 2014-05-15 01:26:57 +0800 |
---|---|---|
committer | Andy Li <andy@onthewings.net> | 2014-05-15 01:26:57 +0800 |
commit | 9daec978bb255a76890cfa7c977b504a0e4fe4a4 (patch) | |
tree | 6d1bc14ef2944f379876b0234e7c82db793f19d5 | |
parent | 91142d31f1d82eb94e19990766c20e648854efa3 (diff) | |
download | pygments-9daec978bb255a76890cfa7c977b504a0e4fe4a4.tar.gz |
Haxe: optional semicolon after macro class reification.
-rw-r--r-- | pygments/lexers/web.py | 8 | ||||
-rw-r--r-- | tests/examplefiles/example.hx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index f7f2b7ef..5a2d6c92 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -1611,10 +1611,10 @@ class HaxeLexer(ExtendedRegexLexer): (r':', Punctuation, ('#pop', 'type')), (r'(?:extern|private)\b', Keyword.Declaration), - (r'(?:abstract)\b', Keyword.Declaration, 'abstract'), - (r'(?:class|interface)\b', Keyword.Declaration, 'class'), - (r'(?:enum)\b', Keyword.Declaration, 'enum'), - (r'(?:typedef)\b', Keyword.Declaration, 'typedef'), + (r'(?:abstract)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'abstract')), + (r'(?:class|interface)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'class')), + (r'(?:enum)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'enum')), + (r'(?:typedef)\b', Keyword.Declaration, ('#pop', 'optional-semicolon', 'typedef')), (r'', Text, ('#pop', 'expr')), ], diff --git a/tests/examplefiles/example.hx b/tests/examplefiles/example.hx index 76749c0a..381cf825 100644 --- a/tests/examplefiles/example.hx +++ b/tests/examplefiles/example.hx @@ -179,7 +179,7 @@ var c = macro class MyClass { } } -var c = macro interface IClass {} +var c = macro interface IClass {}; //ECheckType var f = (123:Float);
\ No newline at end of file |