diff options
| author | John W. Trengrove <john@retrofilter.com> | 2015-04-09 12:16:37 +1000 |
|---|---|---|
| committer | John W. Trengrove <john@retrofilter.com> | 2015-04-12 18:44:43 +1000 |
| commit | 448849f7eb8723a8d11fad287e927c8a8b29cd68 (patch) | |
| tree | 96775b310af5f13985d609024ec72c96e0bee6d1 /config.def.h | |
| parent | 3d6583383bffc75694635fadca2bc89cd5f980ba (diff) | |
| download | vis-448849f7eb8723a8d11fad287e927c8a8b29cd68.tar.gz vis-448849f7eb8723a8d11fad287e927c8a8b29cd68.tar.xz | |
Add javascript syntax highlighting
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h index c0fd91c..e538cbc 100644 --- a/config.def.h +++ b/config.def.h @@ -1034,6 +1034,33 @@ static Syntax syntaxes[] = {{ &colors[COLOR_KEYWORD2], }} },{ + .name = "javascript", + .file = "\\.(js|json)$", + .rules = { + SYNTAX_SINGLE_LINE_COMMENT, + SYNTAX_LITERAL, + SYNTAX_STRING, + SYNTAX_BRACKET, + { + B"(true|false|null|undefined)"B, + &colors[COLOR_DATATYPE], + },{ + B"(NaN|Infinity)"B, + &colors[COLOR_LITERAL], + },{ + "(\"(\\\\.|[^\"])*\"|\'(\\\\.|[^\'])*\')", + &colors[COLOR_STRING], + },{ + B"(for|if|while|do|in|else|case|default|switch|try|throw|catch|operator|new|delete)"B, + &colors[COLOR_KEYWORD], + },{ + B"(continue|break|return)"B, + &colors[COLOR_CONTROL], + },{ + B"(case|class|const|debugger|default|enum|export|extends|finally|function|implements|import|instanceof|let|this|typeof|var|with|yield)"B, + &colors[COLOR_KEYWORD2], + }} +},{ .name = "lua", .file = "\\.lua$", .settings = (const char*[]){ |
