codemirror-rails 3.02 → 3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/codemirror-rails.gemspec +1 -0
- data/doc/CodeMirror-LICENSE +5 -1
- data/lib/codemirror/rails/version.rb +2 -2
- data/vendor/assets/javascripts/codemirror/{utils → addons/dialog}/dialog.js +4 -0
- data/vendor/assets/javascripts/codemirror/addons/display/placeholder.js +54 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +54 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/closetag.js +9 -8
- data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/continuecomment.js +12 -4
- data/vendor/assets/javascripts/codemirror/addons/edit/continuelist.js +25 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/matchbrackets.js +30 -11
- data/vendor/assets/javascripts/codemirror/addons/fold/brace-fold.js +31 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldcode.js +32 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/indent-fold.js +11 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +64 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/html-hint.js +582 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/javascript-hint.js +15 -11
- data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/pig-hint.js +19 -19
- data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/python-hint.js +2 -2
- data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.js +180 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/xml-hint.js +5 -18
- data/vendor/assets/javascripts/codemirror/addons/lint/javascript-lint.js +127 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/json-lint.js +14 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/lint.js +197 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/loadmode.js +0 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/multiplex.js +2 -2
- data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/overlay.js +2 -2
- data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/colorize.js +0 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/runmode-standalone.js +2 -3
- data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/runmode.js +0 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.node.js +89 -0
- data/vendor/assets/javascripts/codemirror/addons/search/match-highlighter.js +60 -0
- data/vendor/assets/javascripts/codemirror/{utils → addons/search}/search.js +5 -5
- data/vendor/assets/javascripts/codemirror/{utils → addons/search}/searchcursor.js +37 -30
- data/vendor/assets/javascripts/codemirror/addons/selection/active-line.js +39 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/mark-selection.js +34 -0
- data/vendor/assets/javascripts/codemirror/keymaps/vim.js +721 -188
- data/vendor/assets/javascripts/codemirror/modes/asterisk.js +6 -6
- data/vendor/assets/javascripts/codemirror/modes/clike.js +14 -14
- data/vendor/assets/javascripts/codemirror/modes/clojure.js +23 -7
- data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +2 -2
- data/vendor/assets/javascripts/codemirror/modes/css.js +337 -235
- data/vendor/assets/javascripts/codemirror/modes/ecl.js +12 -12
- data/vendor/assets/javascripts/codemirror/modes/erlang.js +1 -1
- data/vendor/assets/javascripts/codemirror/modes/gas.js +326 -0
- data/vendor/assets/javascripts/codemirror/modes/gfm.js +1 -0
- data/vendor/assets/javascripts/codemirror/modes/haskell.js +26 -26
- data/vendor/assets/javascripts/codemirror/modes/haxe.js +17 -17
- data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +6 -6
- data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +43 -23
- data/vendor/assets/javascripts/codemirror/modes/javascript.js +78 -33
- data/vendor/assets/javascripts/codemirror/modes/jinja2.js +2 -2
- data/vendor/assets/javascripts/codemirror/modes/less.js +38 -38
- data/vendor/assets/javascripts/codemirror/modes/livescript.js +267 -0
- data/vendor/assets/javascripts/codemirror/modes/lua.js +7 -7
- data/vendor/assets/javascripts/codemirror/modes/markdown.js +108 -57
- data/vendor/assets/javascripts/codemirror/modes/mirc.js +177 -0
- data/vendor/assets/javascripts/codemirror/modes/ntriples.js +22 -22
- data/vendor/assets/javascripts/codemirror/modes/ocaml.js +1 -1
- data/vendor/assets/javascripts/codemirror/modes/perl.js +791 -791
- data/vendor/assets/javascripts/codemirror/modes/php.js +1 -1
- data/vendor/assets/javascripts/codemirror/modes/pig.js +163 -163
- data/vendor/assets/javascripts/codemirror/modes/python.js +31 -31
- data/vendor/assets/javascripts/codemirror/modes/q.js +124 -0
- data/vendor/assets/javascripts/codemirror/modes/rst.js +486 -250
- data/vendor/assets/javascripts/codemirror/modes/sass.js +3 -3
- data/vendor/assets/javascripts/codemirror/modes/scss_test.js +80 -0
- data/vendor/assets/javascripts/codemirror/modes/shell.js +2 -2
- data/vendor/assets/javascripts/codemirror/modes/sieve.js +10 -10
- data/vendor/assets/javascripts/codemirror/modes/smalltalk.js +129 -129
- data/vendor/assets/javascripts/codemirror/modes/smarty.js +3 -3
- data/vendor/assets/javascripts/codemirror/modes/sparql.js +1 -1
- data/vendor/assets/javascripts/codemirror/modes/sql.js +23 -23
- data/vendor/assets/javascripts/codemirror/modes/stex.js +192 -121
- data/vendor/assets/javascripts/codemirror/modes/tcl.js +131 -0
- data/vendor/assets/javascripts/codemirror/modes/test.js +64 -0
- data/vendor/assets/javascripts/codemirror/modes/tiddlywiki.js +345 -345
- data/vendor/assets/javascripts/codemirror/modes/tiki.js +297 -298
- data/vendor/assets/javascripts/codemirror/modes/turtle.js +145 -0
- data/vendor/assets/javascripts/codemirror/modes/vb.js +31 -32
- data/vendor/assets/javascripts/codemirror/modes/vbscript.js +4 -4
- data/vendor/assets/javascripts/codemirror/modes/xml.js +10 -6
- data/vendor/assets/javascripts/codemirror/modes/xquery.js +55 -55
- data/vendor/assets/javascripts/codemirror/modes/yaml.js +90 -90
- data/vendor/assets/javascripts/codemirror/modes/z80.js +82 -110
- data/vendor/assets/javascripts/codemirror.js +1914 -1115
- data/vendor/assets/stylesheets/codemirror/{utils → addons/dialog}/dialog.css +0 -0
- data/vendor/assets/stylesheets/codemirror/addons/hint/show-hint.css +38 -0
- data/vendor/assets/stylesheets/codemirror/addons/lint/lint.css +96 -0
- data/vendor/assets/stylesheets/codemirror/modes/tiki.css +2 -2
- data/vendor/assets/stylesheets/codemirror/themes/ambiance-mobile.css +0 -1
- data/vendor/assets/stylesheets/codemirror/themes/ambiance.css +0 -1
- data/vendor/assets/stylesheets/codemirror/themes/eclipse.css +2 -2
- data/vendor/assets/stylesheets/codemirror/themes/erlang-dark.css +5 -5
- data/vendor/assets/stylesheets/codemirror/themes/midnight.css +52 -0
- data/vendor/assets/stylesheets/codemirror/themes/xq-light.css +43 -0
- data/vendor/assets/stylesheets/codemirror.css +16 -10
- metadata +60 -52
- data/vendor/assets/javascripts/codemirror/modes/mysql.js +0 -203
- data/vendor/assets/javascripts/codemirror/modes/plsql.js +0 -216
- data/vendor/assets/javascripts/codemirror/utils/collapserange.js +0 -68
- data/vendor/assets/javascripts/codemirror/utils/continuelist.js +0 -28
- data/vendor/assets/javascripts/codemirror/utils/foldcode.js +0 -183
- data/vendor/assets/javascripts/codemirror/utils/formatting.js +0 -114
- data/vendor/assets/javascripts/codemirror/utils/match-highlighter.js +0 -46
- data/vendor/assets/javascripts/codemirror/utils/simple-hint.js +0 -102
- data/vendor/assets/stylesheets/codemirror/utils/simple-hint.css +0 -16
@@ -1,113 +1,85 @@
|
|
1
|
-
CodeMirror.defineMode('z80', function()
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
{
|
84
|
-
if (stream.match(/\\?.'/))
|
85
|
-
return 'number';
|
86
|
-
}
|
87
|
-
else if (stream.eat('.') || stream.sol() && stream.eat('#'))
|
88
|
-
{
|
89
|
-
state.context = 4;
|
90
|
-
|
91
|
-
if (stream.eatWhile(/\w/))
|
92
|
-
return 'def';
|
93
|
-
}
|
94
|
-
else if (stream.eat('$'))
|
95
|
-
{
|
96
|
-
if (stream.eatWhile(/[\da-f]/i))
|
97
|
-
return 'number';
|
98
|
-
}
|
99
|
-
else if (stream.eat('%'))
|
100
|
-
{
|
101
|
-
if (stream.eatWhile(/[01]/))
|
102
|
-
return 'number';
|
103
|
-
}
|
104
|
-
else
|
105
|
-
{
|
106
|
-
stream.next();
|
107
|
-
}
|
108
|
-
|
109
|
-
return null;
|
110
|
-
}};
|
1
|
+
CodeMirror.defineMode('z80', function() {
|
2
|
+
var keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i;
|
3
|
+
var keywords2 = /^(call|j[pr]|ret[in]?)\b/i;
|
4
|
+
var keywords3 = /^b_?(call|jump)\b/i;
|
5
|
+
var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i;
|
6
|
+
var variables2 = /^(n?[zc]|p[oe]?|m)\b/i;
|
7
|
+
var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\b/i;
|
8
|
+
var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+)\b/i;
|
9
|
+
|
10
|
+
return {
|
11
|
+
startState: function() {
|
12
|
+
return {context: 0};
|
13
|
+
},
|
14
|
+
token: function(stream, state) {
|
15
|
+
if (!stream.column())
|
16
|
+
state.context = 0;
|
17
|
+
|
18
|
+
if (stream.eatSpace())
|
19
|
+
return null;
|
20
|
+
|
21
|
+
var w;
|
22
|
+
|
23
|
+
if (stream.eatWhile(/\w/)) {
|
24
|
+
w = stream.current();
|
25
|
+
|
26
|
+
if (stream.indentation()) {
|
27
|
+
if (state.context == 1 && variables1.test(w))
|
28
|
+
return 'variable-2';
|
29
|
+
|
30
|
+
if (state.context == 2 && variables2.test(w))
|
31
|
+
return 'variable-3';
|
32
|
+
|
33
|
+
if (keywords1.test(w)) {
|
34
|
+
state.context = 1;
|
35
|
+
return 'keyword';
|
36
|
+
} else if (keywords2.test(w)) {
|
37
|
+
state.context = 2;
|
38
|
+
return 'keyword';
|
39
|
+
} else if (keywords3.test(w)) {
|
40
|
+
state.context = 3;
|
41
|
+
return 'keyword';
|
42
|
+
}
|
43
|
+
|
44
|
+
if (errors.test(w))
|
45
|
+
return 'error';
|
46
|
+
} else if (numbers.test(w)) {
|
47
|
+
return 'number';
|
48
|
+
} else {
|
49
|
+
return null;
|
50
|
+
}
|
51
|
+
} else if (stream.eat(';')) {
|
52
|
+
stream.skipToEnd();
|
53
|
+
return 'comment';
|
54
|
+
} else if (stream.eat('"')) {
|
55
|
+
while (w = stream.next()) {
|
56
|
+
if (w == '"')
|
57
|
+
break;
|
58
|
+
|
59
|
+
if (w == '\\')
|
60
|
+
stream.next();
|
61
|
+
}
|
62
|
+
return 'string';
|
63
|
+
} else if (stream.eat('\'')) {
|
64
|
+
if (stream.match(/\\?.'/))
|
65
|
+
return 'number';
|
66
|
+
} else if (stream.eat('.') || stream.sol() && stream.eat('#')) {
|
67
|
+
state.context = 4;
|
68
|
+
|
69
|
+
if (stream.eatWhile(/\w/))
|
70
|
+
return 'def';
|
71
|
+
} else if (stream.eat('$')) {
|
72
|
+
if (stream.eatWhile(/[\da-f]/i))
|
73
|
+
return 'number';
|
74
|
+
} else if (stream.eat('%')) {
|
75
|
+
if (stream.eatWhile(/[01]/))
|
76
|
+
return 'number';
|
77
|
+
} else {
|
78
|
+
stream.next();
|
79
|
+
}
|
80
|
+
return null;
|
81
|
+
}
|
82
|
+
};
|
111
83
|
});
|
112
84
|
|
113
85
|
CodeMirror.defineMIME("text/x-z80", "z80");
|