Skip to content

Instantly share code, notes, and snippets.

@pkulchenko
Created March 12, 2014 23:49
Show Gist options
  • Save pkulchenko/9519158 to your computer and use it in GitHub Desktop.
Save pkulchenko/9519158 to your computer and use it in GitHub Desktop.
Simple JavaScript spec file for ZeroBrane Studio (put it in spec/folder)
-- author: Paul Kulchenko
---------------------------------------------------------
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*"
return {
exts = {"js", "json"},
lexer = wxstc.wxSTC_LEX_ESCRIPT,
apitype = "js",
linecomment = "//",
stylingbits = 5,
isfncall = function(str)
return string.find(str, funccall .. "%(")
end,
lexerstyleconvert = {
text = {wxstc.wxSTC_ESCRIPT_IDENTIFIER,},
lexerdef = {wxstc.wxSTC_ESCRIPT_DEFAULT,},
comment = {wxstc.wxSTC_ESCRIPT_COMMENT,
wxstc.wxSTC_ESCRIPT_COMMENTLINE,
wxstc.wxSTC_ESCRIPT_COMMENTDOC,},
stringtxt = {wxstc.wxSTC_ESCRIPT_STRING,
wxstc.wxSTC_ESCRIPT_CHARACTER},
stringeol = {wxstc.wxSTC_ESCRIPT_STRINGEOL,},
preprocessor= {wxstc.wxSTC_ESCRIPT_PREPROCESSOR,},
operator = {wxstc.wxSTC_ESCRIPT_OPERATOR,},
number = {wxstc.wxSTC_ESCRIPT_NUMBER,},
keywords0 = {wxstc.wxSTC_ESCRIPT_WORD,},
keywords1 = {wxstc.wxSTC_ESCRIPT_WORD2,},
},
keywords = {
[[ undefined window document ]]
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment