From 73439a14e93de87336e297d8a0d87b920472a489 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 19 Jan 2014 12:47:33 -0800 Subject: [PATCH] Syntax highlight the new @import as pre-processor. --- Cycript.l.in | 2 +- Highlight.cpp | 1 + Highlight.hpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cycript.l.in b/Cycript.l.in index e7bd05c..40316ae 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -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); diff --git a/Highlight.cpp b/Highlight.cpp index 0a077a8..4cfc8db 100644 --- a/Highlight.cpp +++ b/Highlight.cpp @@ -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; diff --git a/Highlight.hpp b/Highlight.hpp index 278ff07..5dcf46b 100644 --- a/Highlight.hpp +++ b/Highlight.hpp @@ -33,6 +33,7 @@ namespace hi { enum Value { Meta, Nothing, Operator, + Special, Structure, Type, }; } -- 2.47.2