Branch: refs/heads/master Author: Christian Schrötter cs@fnx.li Committer: Christian Schrötter cs@fnx.li Date: Fri, 02 Aug 2024 00:03:00 UTC Commit: c942622e453362f1f93a9d73e143815c5ae26db8 https://github.com/geany/geany/commit/c942622e453362f1f93a9d73e143815c5ae26d...
Log Message: ----------- Add CIL lexer/filetype
Modified Paths: -------------- data/Makefile.am data/filedefs/filetypes.cil data/filetype_extensions.conf meson.build scintilla/Makefile.am scintilla/lexilla/lexers/LexCIL.cxx scintilla/lexilla/src/Lexilla.cxx scintilla/scintilla_changes.patch src/editor.c src/filetypes.c src/filetypes.h src/highlighting.c src/highlightingmappings.h
Modified: data/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -15,6 +15,7 @@ filetypes_dist = \ filedefs/filetypes.bibtex \ filedefs/filetypes.c \ filedefs/filetypes.caml \ + filedefs/filetypes.cil \ filedefs/filetypes.Clojure.conf \ filedefs/filetypes.cmake \ filedefs/filetypes.cobol \
Modified: data/filedefs/filetypes.cil 61 lines changed, 61 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,61 @@ +# For complete documentation of this file, please see Geany's main documentation +[styling] +# Edit these in the colorscheme .conf file instead +default=default +comment=comment +commentline=comment_line +string=string +keyword=type +keyword2=keyword_2 +keyword3=keyword_1 +label=preprocessor +operator=operator +stringeol=string_eol +identifier=identifier_1 + +[keywords] +# Credits: Jad Altahan (github.com/xv) - https://sourceforge.net/p/scintilla/feature-requests/1265/#fa85/e6e8/8255/9e... +keywords=bool char float32 float64 int int8 int16 int32 int64 native nullref object string typedref uint8 uint32 unsigned abstract ansi assembly auto autochar beforefieldinit catch cdecl cil class compilercontrolled explicit extends extern famandassem family famorassem fastcall final finally forwardref hidebysig implements initonly instance interface internalcall lasterr literal managed nested newslot noinlining nomangle nooptimization notserialized optil pinvokeimpl platformapi preservesig private privatescope public reqsecobj rtspecialname runtime sealed sequential serializable specialname static stdcall strict synchronized thiscall unicode unmanaged unmanagedexp valuetype vararg virtual void winapi +metadata=.addon .assembly .cctor .class .corflags .ctor .custom .data .emitbyte .entrypoint .event .export .field .file .fire .get .hash .imagebase .import .language .line .locale .localized .locals .manifestres .maxstack .method .module .mresource .namespace .other .override .pack .param .pdirect .permission .permissionset .property .property .publickey .publickeytoken .removeon .set .size .stackreserve .subsystem .try .ver .vtable .vtentry .vtfixup .zeroinit +opcode=add add.ovf add.ovf.un and arglist beq beq.s bge bge.s bge.un bge.un.s bgt bgt.s bgt.un bgt.un.s ble ble.s ble.un ble.un.s blt blt.s blt.un blt.un.s bne.un bne.un.s box br br.s break brfalse brfalse.s brinst brinst.s brnull brnull.s brtrue brtrue.s brzero brzero.s bstr call calli callmostderived callvirt castclass ceq cgt cgt.un ckfinite ckfinite clt clt.un constrained. conv.i conv.i1 conv.i2 conv.i4 conv.i8 conv.ovf.i conv.ovf.i.un conv.ovf.i1 conv.ovf.i1.un conv.ovf.i2 conv.ovf.i2.un conv.ovf.i4 conv.ovf.i4.un conv.ovf.i8 conv.ovf.i8.un conv.ovf.u conv.ovf.u.un conv.ovf.u1 conv.ovf.u1.un conv.ovf.u2 conv.ovf.u2.un conv.ovf.u4 conv.ovf.u4.un conv.ovf.u8 conv.ovf.u8.un conv.r.un conv.r4 conv.r8 conv.u conv.u1 conv.u2 conv.u4 conv.u8 cpblk cpobj div div.un dup endfault endfilter endfinally initblk initobj isinst jmp ldarg ldarg.0 ldarg.1 ldarg.2 ldarg.3 ldarg.s ldarga ldarga.s ldc.i4 ldc.i4.0 ldc.i4.1 ldc.i4.2 ldc.i4.3 ldc.i4.4 ldc.i4.5 ldc.i4.6 ldc.i4.7 ldc.i4.8 ldc.i4.m1 ldc .i4.s ldc.i8 ldc.r4 ldc.r8 ldelem ldelem.i ldelem.i1 ldelem.i2 ldelem.i4 ldelem.i8 ldelem.r4 ldelem.r8 ldelem.ref ldelem.u1 ldelem.u2 ldelem.u4 ldelema ldfld ldflda ldftn ldind.i ldind.i1 ldind.i2 ldind.i4 ldind.i8 ldind.r4 ldind.r8 ldind.ref ldind.u1 ldind.u2 ldind.u4 ldlen ldloc ldloc.0 ldloc.1 ldloc.2 ldloc.3 ldloc.s ldloca ldloca.s ldnull ldobj ldsfld ldsflda ldstr ldtoken ldvirtftn leave leave.s localloc mkrefany mul mul.ovf mul.ovf.un neg newarr newobj no. nop not or pop readonly. refanytype refanyval rem rem.un ret rethrow shl shr shr.un sizeof starg starg.s stelem stelem.i stelem.i1 stelem.i2 stelem.i4 stelem.i8 stelem.r4 stelem.r8 stelem.ref stfld stind.i stind.i1 stind.i2 stind.i4 stind.i8 stind.r4 stind.r8 stind.ref stloc stloc.0 stloc.1 stloc.2 stloc.3 stloc.s stobj stsfld sub sub.ovf sub.ovf.un switch tail. throw unaligned. unbox unbox.any volatile. xor + +[settings] +lexer_filetype=CIL + +# default extension used when saving files +extension=il + +# MIME type +mime_type=text/x-cil + +# these characters define word boundaries when making selections and searching +# using word matching options +#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + +# single comments, like # in this file +comment_single=// +# multiline comments +comment_open=/* +comment_close=*/ + +# set to false if a comment character/string should start at column 0 of a line, true uses any +# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d +# #command_example(); +# setting to false would generate this +# # command_example(); +# This setting works only for single line comments +comment_use_indent=true + +# context action command (please see Geany's main documentation for details) +context_action_cmd= + +[indentation] +#width=4 +# 0 is spaces, 1 is tabs, 2 is tab & spaces +#type=1 + +[build_settings] +## %f will be replaced by the complete filename +## %e will be replaced by the filename without extension +#compiler=ilasm /OUTPUT="%e.exe" "%f" +#run_cmd="./%e.exe"
Modified: data/filetype_extensions.conf 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -15,6 +15,7 @@ BibTeX=*.bib; CAML=*.ml;*.mli; C=*.c;*.xpm; C++=*.cpp;*.cxx;*.c++;*.cc;*.h;*.hpp;*.hxx;*.h++;*.hh;*.C;*.H; +CIL=*.il;*.cil; Clojure=*.clj;*.cljs;*.cljc; CUDA=*.cu;*.cuh;*.h; C#=*.cs;
Modified: meson.build 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -251,6 +251,7 @@ lexilla = static_library('lexilla', 'scintilla/lexilla/lexers/LexBasic.cxx', 'scintilla/lexilla/lexers/LexBatch.cxx', 'scintilla/lexilla/lexers/LexCaml.cxx', + 'scintilla/lexilla/lexers/LexCIL.cxx', 'scintilla/lexilla/lexers/LexCmake.cxx', 'scintilla/lexilla/lexers/LexCOBOL.cxx', 'scintilla/lexilla/lexers/LexCoffeeScript.cxx',
Modified: scintilla/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -20,6 +20,7 @@ lexilla/lexers/LexAU3.cxx \ lexilla/lexers/LexBash.cxx \ lexilla/lexers/LexBasic.cxx \ lexilla/lexers/LexBatch.cxx \ +lexilla/lexers/LexCIL.cxx \ lexilla/lexers/LexCOBOL.cxx \ lexilla/lexers/LexCPP.cxx \ lexilla/lexers/LexCSS.cxx \
Modified: scintilla/lexilla/lexers/LexCIL.cxx 410 lines changed, 410 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,410 @@ +// Scintilla source code edit control +/** @file LexCIL.cxx + ** Lexer for Common Intermediate Language + ** Written by Jad Altahan (github.com/xv) + ** CIL manual: https://www.ecma-international.org/publications/standards/Ecma-335.htm + **/ +// Copyright 1998-2001 by Neil Hodgson neilh@scintilla.org +// The License.txt file describes the conditions under which this software may be distributed. + +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <stdarg.h> +#include <assert.h> +#include <ctype.h> + +#include <string> +#include <string_view> +#include <map> +#include <algorithm> +#include <functional> + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "StringCopy.h" +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" +#include "OptionSet.h" +#include "DefaultLexer.h" + +using namespace Scintilla; +using namespace Lexilla; + +namespace { + // Use an unnamed namespace to protect the functions and classes from name conflicts + +bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); +} + +bool IsOperator(const int ch) { + if ((ch < 0x80) && (isalnum(ch))) + return false; + + if (strchr("!%&*+-/<=>@^|~()[]{}", ch)) { + return true; + } + + return false; +} + +constexpr bool IsStreamCommentStyle(const int style) noexcept { + return style == SCE_CIL_COMMENT; +} + +struct OptionsCIL { + bool fold; + bool foldComment; + bool foldCommentMultiline; + bool foldCompact; + + OptionsCIL() { + fold = true; + foldComment = false; + foldCommentMultiline = true; + foldCompact = true; + } +}; + +static const char *const cilWordListDesc[] = { + "Primary CIL keywords", + "Metadata", + "Opcode instructions", + 0 +}; + +struct OptionSetCIL : public OptionSet<OptionsCIL> { + OptionSetCIL() { + DefineProperty("fold", &OptionsCIL::fold); + DefineProperty("fold.comment", &OptionsCIL::foldComment); + + DefineProperty("fold.cil.comment.multiline", &OptionsCIL::foldCommentMultiline, + "Set this property to 0 to disable folding multi-line comments when fold.comment=1."); + + DefineProperty("fold.compact", &OptionsCIL::foldCompact); + + DefineWordListSets(cilWordListDesc); + } +}; + +LexicalClass lexicalClasses[] = { + // Lexer CIL SCLEX_CIL SCE_CIL_: + 0, "SCE_CIL_DEFAULT", "default", "White space", + 1, "SCE_CIL_COMMENT", "comment", "Multi-line comment", + 2, "SCE_CIL_COMMENTLINE", "comment line", "Line comment", + 3, "SCE_CIL_WORD", "keyword", "Keyword 1", + 4, "SCE_CIL_WORD2", "keyword", "Keyword 2", + 5, "SCE_CIL_WORD3", "keyword", "Keyword 3", + 6, "SCE_CIL_STRING", "literal string", "Double quoted string", + 7, "SCE_CIL_LABEL", "label", "Code label", + 8, "SCE_CIL_OPERATOR", "operator", "Operators", + 9, "SCE_CIL_STRINGEOL", "error literal string", "String is not closed", + 10, "SCE_CIL_IDENTIFIER", "identifier", "Identifiers", +}; + +} + +class LexerCIL : public DefaultLexer { + WordList keywords, keywords2, keywords3; + OptionsCIL options; + OptionSetCIL osCIL; + +public: + LexerCIL() : DefaultLexer("cil", SCLEX_CIL, lexicalClasses, ELEMENTS(lexicalClasses)) { } + + virtual ~LexerCIL() { } + + void SCI_METHOD Release() override { + delete this; + } + + int SCI_METHOD Version() const override { + return lvRelease5; + } + + const char * SCI_METHOD PropertyNames() override { + return osCIL.PropertyNames(); + } + + int SCI_METHOD PropertyType(const char *name) override { + return osCIL.PropertyType(name); + } + + const char * SCI_METHOD DescribeProperty(const char *name) override { + return osCIL.DescribeProperty(name); + } + + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + + const char * SCI_METHOD PropertyGet(const char* key) override { + return osCIL.PropertyGet(key); + } + + const char * SCI_METHOD DescribeWordListSets() override { + return osCIL.DescribeWordListSets(); + } + + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; + + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; + + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; + } + + int SCI_METHOD LineEndTypesSupported() override { + return SC_LINE_END_TYPE_UNICODE; + } + + int SCI_METHOD PrimaryStyleFromStyle(int style) override { + return style; + } + + static ILexer5 *LexerFactoryCIL() { + return new LexerCIL(); + } +}; + +Sci_Position SCI_METHOD LexerCIL::PropertySet(const char *key, const char *val) { + if (osCIL.PropertySet(&options, key, val)) { + return 0; + } + + return -1; +} + +Sci_Position SCI_METHOD LexerCIL::WordListSet(int n, const char *wl) { + WordList *wordListN = 0; + + switch (n) { + case 0: + wordListN = &keywords; + break; + case 1: + wordListN = &keywords2; + break; + case 2: + wordListN = &keywords3; + break; + } + + Sci_Position firstModification = -1; + + if (wordListN) { + WordList wlNew; + wlNew.Set(wl); + + if (*wordListN != wlNew) { + wordListN->Set(wl); + firstModification = 0; + } + } + + return firstModification; +} + +void SCI_METHOD LexerCIL::Lex(Sci_PositionU startPos, Sci_Position length, + int initStyle, IDocument *pAccess) { + if (initStyle == SCE_CIL_STRINGEOL) { + initStyle = SCE_CIL_DEFAULT; + } + + Accessor styler(pAccess, NULL); + StyleContext sc(startPos, length, initStyle, styler); + + bool identAtLineStart = false, // Checks if an identifier is at line start (ignoring spaces) + canStyleLabels = false; // Checks if conditions are met to style SCE_CIL_LABEL + + for (; sc.More(); sc.Forward()) { + if (sc.atLineStart) { + if (sc.state == SCE_CIL_STRING) { + sc.SetState(SCE_CIL_STRING); + } + + identAtLineStart = true; + } + + // Handle string line continuation + if (sc.ch == '\' && (sc.chNext == '\n' || sc.chNext == '\r') && + (sc.state == SCE_CIL_STRING)) { + sc.Forward(); + + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + + continue; + } + + switch (sc.state) { + case SCE_CIL_OPERATOR: + sc.SetState(SCE_CIL_DEFAULT); + break; + case SCE_CIL_IDENTIFIER: + if (!IsAWordChar(sc.ch)) { + if (canStyleLabels && (sc.ch == ':' && sc.chNext != ':')) { + sc.ChangeState(SCE_CIL_LABEL); + sc.ForwardSetState(SCE_CIL_DEFAULT); + } else { + char kwSize[100]; + sc.GetCurrent(kwSize, sizeof(kwSize)); + int style = SCE_CIL_IDENTIFIER; + + if (keywords.InList(kwSize)) { + style = SCE_CIL_WORD; + } else if (keywords2.InList(kwSize)) { + style = SCE_CIL_WORD2; + } else if (keywords3.InList(kwSize)) { + style = SCE_CIL_WORD3; + } + + sc.ChangeState(style); + sc.SetState(SCE_CIL_DEFAULT); + } + } + break; + case SCE_CIL_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_CIL_DEFAULT); + } + break; + case SCE_CIL_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_CIL_DEFAULT); + } + break; + case SCE_CIL_STRING: + if (sc.ch == '\') { + if (sc.chNext == '"' || sc.chNext == '\') { + sc.Forward(); + } + } else if (sc.ch == '"') { + sc.ForwardSetState(SCE_CIL_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_CIL_STRINGEOL); + sc.ForwardSetState(SCE_CIL_DEFAULT); + } + break; + } + + if (sc.state == SCE_CIL_DEFAULT) { + // String + if (sc.ch == '"') { + sc.SetState(SCE_CIL_STRING); + } + // Keyword + else if (IsAWordChar(sc.ch)) { + // Allow setting SCE_CIL_LABEL style only if the label is the + // first token in the line and does not start with a dot or a digit + canStyleLabels = identAtLineStart && !(sc.ch == '.' || IsADigit(sc.ch)); + sc.SetState(SCE_CIL_IDENTIFIER); + } + // Multi-line comment + else if (sc.Match('/', '*')) { + sc.SetState(SCE_CIL_COMMENT); + sc.Forward(); + } + // Line comment + else if (sc.Match('/', '/')) { + sc.SetState(SCE_CIL_COMMENTLINE); + } + // Operators + else if (IsOperator(sc.ch)) { + sc.SetState(SCE_CIL_OPERATOR); + } + } + + if (!IsASpace(sc.ch)) { + identAtLineStart = false; + } + } + + sc.Complete(); +} + +void SCI_METHOD LexerCIL::Fold(Sci_PositionU startPos, Sci_Position length, + int initStyle, IDocument *pAccess) { + if (!options.fold) { + return; + } + + LexAccessor styler(pAccess); + + const Sci_PositionU endPos = startPos + length; + Sci_Position lineCurrent = styler.GetLine(startPos); + + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16; + + int style = initStyle; + int styleNext = styler.StyleAt(startPos); + int levelNext = levelCurrent; + int visibleChars = 0; + + char chNext = styler[startPos]; + + for (Sci_PositionU i = startPos; i < endPos; i++) { + const char ch = chNext; + int stylePrev = style; + + chNext = styler.SafeGetCharAt(i + 1); + style = styleNext; + styleNext = styler.StyleAt(i + 1); + + const bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (options.foldComment && + options.foldCommentMultiline && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + levelNext--; + } + } + + if (style == SCE_CIL_OPERATOR) { + if (ch == '{') { + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + + if (!IsASpace(ch)) { + visibleChars++; + } + + if (atEOL || (i == endPos - 1)) { + int lev = levelCurrent | levelNext << 16; + if (visibleChars == 0 && options.foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelCurrent < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + + lineCurrent++; + levelCurrent = levelNext; + + if (options.foldCompact && + i == static_cast<Sci_PositionU>(styler.Length() - 1)) { + styler.SetLevel(lineCurrent, lev | SC_FOLDLEVELWHITEFLAG); + } + + visibleChars = 0; + } + } +} + +LexerModule lmCIL(SCLEX_CIL, LexerCIL::LexerFactoryCIL, "cil", cilWordListDesc); \ No newline at end of file
Modified: scintilla/lexilla/src/Lexilla.cxx 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -178,6 +178,7 @@ static void AddGeanyLexers() &lmBash, &lmBatch, &lmCaml, + &lmCIL, &lmCmake, &lmCOBOL, &lmCoffeeScript,
Modified: scintilla/scintilla_changes.patch 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -77,6 +77,7 @@ index cd4b23617..af4a73db4 100644 + &lmBash, + &lmBatch, + &lmCaml, ++ &lmCIL, + &lmCmake, + &lmCOBOL, + &lmCoffeeScript,
Modified: src/editor.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -1313,6 +1313,7 @@ static gboolean lexer_has_braces(ScintillaObject *sci)
switch (lexer) { + case SCLEX_CIL: case SCLEX_CPP: case SCLEX_D: case SCLEX_HTML: /* for PHP & JS */
Modified: src/filetypes.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -190,6 +190,7 @@ static void init_builtin_filetypes(void) FT_INIT( JULIA, JULIA, "Julia", NULL, SOURCE_FILE, SCRIPT ); FT_INIT( AU3, AUTOIT, "AutoIt", NULL, SCRIPT, SCRIPT ); FT_INIT( RAKU, RAKU, "Raku", NULL, SOURCE_FILE, SCRIPT ); + FT_INIT( CIL, NONE, "CIL", NULL, SOURCE_FILE, COMPILED ); }
Modified: src/filetypes.h 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -110,6 +110,7 @@ typedef enum GEANY_FILETYPES_JULIA, GEANY_FILETYPES_AU3, GEANY_FILETYPES_RAKU, + GEANY_FILETYPES_CIL, /* ^ append items here */ GEANY_MAX_BUILT_IN_FILETYPES /* Don't use this, use filetypes_array->len instead */ }
Modified: src/highlighting.c 11 lines changed, 11 insertions(+), 0 deletions(-) =================================================================== @@ -1007,6 +1007,7 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co init_styleset_case(BATCH); init_styleset_case(C); init_styleset_case(CAML); + init_styleset_case(CIL); init_styleset_case(CMAKE); init_styleset_case(COBOL); init_styleset_case(COFFEESCRIPT); @@ -1100,6 +1101,7 @@ void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft) styleset_case(BATCH); styleset_case(C); styleset_case(CAML); + styleset_case(CIL); styleset_case(CMAKE); styleset_case(COBOL); styleset_case(COFFEESCRIPT); @@ -1579,6 +1581,10 @@ gboolean highlighting_is_string_style(gint lexer, gint style) style == SCE_H_SGML_SIMPLESTRING || style == SCE_H_SINGLESTRING);
+ case SCLEX_CIL: + return (style == SCE_CIL_STRING || + style == SCE_CIL_STRINGEOL); + case SCLEX_CMAKE: return (style == SCE_CMAKE_STRINGDQ || style == SCE_CMAKE_STRINGLQ || @@ -1804,6 +1810,11 @@ gboolean highlighting_is_comment_style(gint lexer, gint style) style == SCE_HPHP_COMMENTLINE || style == SCE_H_SGML_COMMENT);
+ case SCLEX_CIL: + return ( + style == SCE_CIL_COMMENT || + style == SCE_CIL_COMMENTLINE); + case SCLEX_CMAKE: return (style == SCE_CMAKE_COMMENT);
Modified: src/highlightingmappings.h 25 lines changed, 25 insertions(+), 0 deletions(-) =================================================================== @@ -344,6 +344,31 @@ static const HLKeyword highlighting_keywords_CAML[] = #define highlighting_properties_CAML EMPTY_PROPERTIES
+/* CIL */ +#define highlighting_lexer_CIL SCLEX_CIL +static const HLStyle highlighting_styles_CIL[] = +{ + { SCE_CIL_DEFAULT, "default", FALSE }, + { SCE_CIL_COMMENT, "comment", FALSE }, + { SCE_CIL_COMMENTLINE, "commentline", FALSE }, + { SCE_CIL_WORD, "keyword", FALSE }, + { SCE_CIL_WORD2, "keyword2", FALSE }, + { SCE_CIL_WORD3, "keyword3", FALSE }, + { SCE_CIL_STRING, "string", FALSE }, + { SCE_CIL_LABEL, "label", FALSE }, + { SCE_CIL_OPERATOR, "operator", FALSE }, + { SCE_CIL_STRINGEOL, "stringeol", FALSE }, + { SCE_CIL_IDENTIFIER, "identifier", FALSE } +}; +static const HLKeyword highlighting_keywords_CIL[] = +{ + { 0, "keywords", FALSE }, + { 1, "metadata", FALSE }, + { 2, "opcode", FALSE } +}; +#define highlighting_properties_CIL EMPTY_PROPERTIES + + /* CMake */ #define highlighting_lexer_CMAKE SCLEX_CMAKE static const HLStyle highlighting_styles_CMAKE[] =
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).