diff options
author | Neil <nyamatongwe@gmail.com> | 2017-07-17 14:37:48 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-07-17 14:37:48 +1000 |
commit | db6528b463841e9ea05fb9dad1559d263b1f6a34 (patch) | |
tree | 0131d0de33a0ecabadf7d81ebe3d3a50551642e8 /lexers/LexLua.cxx | |
parent | ff97c84526a6105c8371cc75333053640b4b4ccb (diff) | |
download | scintilla-mirror-db6528b463841e9ea05fb9dad1559d263b1f6a34.tar.gz |
Backport: Implement style metadata for some languages.
Add some helper methods to SubStyles for finding style metadata of substyles.
Backport of changeset 6349:f350a2543488.
Diffstat (limited to 'lexers/LexLua.cxx')
-rw-r--r-- | lexers/LexLua.cxx | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/lexers/LexLua.cxx b/lexers/LexLua.cxx index 9e86b8a14..018521791 100644 --- a/lexers/LexLua.cxx +++ b/lexers/LexLua.cxx @@ -18,6 +18,7 @@ #include "Scintilla.h" #include "SciLexer.h" +#include "StringCopy.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" @@ -433,4 +434,33 @@ static const char * const luaWordListDesc[] = { 0 }; -LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc, luaWordListDesc); +namespace { + +LexicalClass lexicalClasses[] = { + // Lexer Lua SCLEX_LUA SCE_LUA_: + 0, "SCE_LUA_DEFAULT", "default", "White space: Visible only in View Whitespace mode (or if it has a back colour)", + 1, "SCE_LUA_COMMENT", "comment", "Block comment (Lua 5.0)", + 2, "SCE_LUA_COMMENTLINE", "comment line", "Line comment", + 3, "SCE_LUA_COMMENTDOC", "comment documentation", "Doc comment -- Not used in Lua (yet?)", + 4, "SCE_LUA_NUMBER", "literal numeric", "Number", + 5, "SCE_LUA_WORD", "keyword", "Keyword", + 6, "SCE_LUA_STRING", "literal string", "(Double quoted) String", + 7, "SCE_LUA_CHARACTER", "literal string character", "Character (Single quoted string)", + 8, "SCE_LUA_LITERALSTRING", "literal string", "Literal string", + 9, "SCE_LUA_PREPROCESSOR", "preprocessor", "Preprocessor (obsolete in Lua 4.0 and up)", + 10, "SCE_LUA_OPERATOR", "operator", "Operators", + 11, "SCE_LUA_IDENTIFIER", "identifier", "Identifier (everything else...)", + 12, "SCE_LUA_STRINGEOL", "error literal string", "End of line where string is not closed", + 13, "SCE_LUA_WORD2", "identifier", "Other keywords", + 14, "SCE_LUA_WORD3", "identifier", "Other keywords", + 15, "SCE_LUA_WORD4", "identifier", "Other keywords", + 16, "SCE_LUA_WORD5", "identifier", "Other keywords", + 17, "SCE_LUA_WORD6", "identifier", "Other keywords", + 18, "SCE_LUA_WORD7", "identifier", "Other keywords", + 19, "SCE_LUA_WORD8", "identifier", "Other keywords", + 20, "SCE_LUA_LABEL", "label", "Labels", +}; + +} + +LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc, luaWordListDesc, lexicalClasses, ELEMENTS(lexicalClasses)); |