diff options
author | Tim Hatch <tim@timhatch.com> | 2014-04-14 13:24:21 -0400 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-04-14 13:24:21 -0400 |
commit | c94ee3502c1b2b474d185247e489949df26f63dd (patch) | |
tree | 04221046fdb9498142da712c150eb06fae32adeb /pygments/lexers/compiled.py | |
parent | 101fe63dc9d131a696f41607bbbcacd59bc69d72 (diff) | |
parent | 8fdfce1177953cc1c076f32924017af763f1cda1 (diff) | |
download | pygments-c94ee3502c1b2b474d185247e489949df26f63dd.tar.gz |
Merged in biozic/pygments-main (pull request #294)
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r-- | pygments/lexers/compiled.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 2737859b..e6e10098 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -469,20 +469,23 @@ class DLexer(RegexLexer): (r'(abstract|alias|align|asm|assert|auto|body|break|case|cast' r'|catch|class|const|continue|debug|default|delegate|delete' r'|deprecated|do|else|enum|export|extern|finally|final' - r'|foreach_reverse|foreach|for|function|goto|if|import|inout' - r'|interface|invariant|in|is|lazy|mixin|module|new|nothrow|out' + r'|foreach_reverse|foreach|for|function|goto|if|immutable|import' + r'|interface|invariant|inout|in|is|lazy|mixin|module|new|nothrow|out' r'|override|package|pragma|private|protected|public|pure|ref|return' - r'|scope|static|struct|super|switch|synchronized|template|this' + r'|scope|shared|static|struct|super|switch|synchronized|template|this' r'|throw|try|typedef|typeid|typeof|union|unittest|version|volatile' - r'|while|with|__traits)\b', Keyword + r'|while|with|__gshared|__traits|__vector|__parameters)\b', Keyword ), (r'(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float' r'|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong' r'|ushort|void|wchar)\b', Keyword.Type ), (r'(false|true|null)\b', Keyword.Constant), + (r'(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__' + r'|__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\b', + Keyword.Pseudo), (r'macro\b', Keyword.Reserved), - (r'(string|wstring|dstring)\b', Name.Builtin), + (r'(string|wstring|dstring|size_t|ptrdiff_t)\b', Name.Builtin), # FloatLiteral # -- HexFloat (r'0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)' @@ -528,6 +531,8 @@ class DLexer(RegexLexer): (r'q"(.).*?\1"', String), # -- TokenString (r'q{', String, 'token_string'), + # Attributes + (r'@([a-zA-Z_]\w*)?', Name.Decorator), # Tokens (r'(~=|\^=|%=|\*=|==|!>=|!<=|!<>=|!<>|!<|!>|!=|>>>=|>>>|>>=|>>|>=' r'|<>=|<>|<<=|<<|<=|\+\+|\+=|--|-=|\|\||\|=|&&|&=|\.\.\.|\.\.|/=)' @@ -535,6 +540,8 @@ class DLexer(RegexLexer): ), # Identifier (r'[a-zA-Z_]\w*', Name), + # Line + (r'#line\s.*\n', Comment.Special), ], 'nested_comment': [ (r'[^+/]+', Comment.Multiline), |