]> git.saurik.com Git - cycript.git/commitdiff
Syntax highlight the new @import as pre-processor.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 19 Jan 2014 20:47:33 +0000 (12:47 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 19 Jan 2014 20:47:33 +0000 (12:47 -0800)
Cycript.l.in
Highlight.cpp
Highlight.hpp

index e7bd05c8bf823338ae1067fbb91dbb21c5b756df..40316ae54d9e5d10e475fa629fd3ef485fde7edb 100644 (file)
@@ -266,7 +266,7 @@ XMLName {XMLNameStart}{XMLNamePart}*
 "@encode"         L C F(tk::AtEncode, hi::Meta);
 "@end"            L C F(tk::AtEnd, hi::Meta);
 "@implementation" L C F(yyextra->no_.AtImplementation ? tk::AtImplementation_ : tk::AtImplementation, hi::Meta);
-"@import"         L C F(tk::AtImport, hi::Meta);
+"@import"         L C F(tk::AtImport, hi::Special);
 "@selector"       L C F(tk::AtSelector, hi::Meta);
 
 "NULL"         L C I(identifier, Identifier("NULL"), tk::Identifier_, hi::Constant);
index 0a077a8a7b58f0bb6bc43184f944508f627c85b1..4cfc8db26a60bc93d0bc5d08dd6bf9356eba7dad 100644 (file)
@@ -79,6 +79,7 @@ void CYLexerHighlight(const char *data, size_t size, std::ostream &output, bool
             case hi::Meta: color = CYColor(false, 32); break;
             case hi::Nothing: color = CYColor(false, 0); break;
             case hi::Operator: color = CYColor(false, 36); break;
+            case hi::Special: color = CYColor(false, 35); break;
             case hi::Structure: color = CYColor(true, 34); break;
             case hi::Type: color = CYColor(true, 34); break;
 
index 278ff07b9883a28c294b57b8b71d8c2184f2f3fa..5dcf46b77a2bbf6c1c02318bd080b78dd7709974 100644 (file)
@@ -33,6 +33,7 @@ namespace hi { enum Value {
     Meta,
     Nothing,
     Operator,
+    Special,
     Structure,
     Type,
 }; }