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
@@ -0,0 +1,177 @@
|
|
1
|
+
//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara
|
2
|
+
CodeMirror.defineMIME("text/mirc", "mirc");
|
3
|
+
CodeMirror.defineMode("mirc", function() {
|
4
|
+
function parseWords(str) {
|
5
|
+
var obj = {}, words = str.split(" ");
|
6
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
7
|
+
return obj;
|
8
|
+
}
|
9
|
+
var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " +
|
10
|
+
"$activewid $address $addtok $agent $agentname $agentstat $agentver " +
|
11
|
+
"$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " +
|
12
|
+
"$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " +
|
13
|
+
"$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " +
|
14
|
+
"$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " +
|
15
|
+
"$com $comcall $comchan $comerr $compact $compress $comval $cos $count " +
|
16
|
+
"$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " +
|
17
|
+
"$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " +
|
18
|
+
"$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " +
|
19
|
+
"$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " +
|
20
|
+
"$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " +
|
21
|
+
"$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " +
|
22
|
+
"$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " +
|
23
|
+
"$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " +
|
24
|
+
"$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " +
|
25
|
+
"$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " +
|
26
|
+
"$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " +
|
27
|
+
"$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " +
|
28
|
+
"$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " +
|
29
|
+
"$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " +
|
30
|
+
"$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " +
|
31
|
+
"$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " +
|
32
|
+
"$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " +
|
33
|
+
"$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " +
|
34
|
+
"$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " +
|
35
|
+
"$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " +
|
36
|
+
"$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " +
|
37
|
+
"$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " +
|
38
|
+
"$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " +
|
39
|
+
"$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " +
|
40
|
+
"$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " +
|
41
|
+
"$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " +
|
42
|
+
"$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " +
|
43
|
+
"$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " +
|
44
|
+
"$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor");
|
45
|
+
var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " +
|
46
|
+
"away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " +
|
47
|
+
"channel clear clearall cline clipboard close cnick color comclose comopen " +
|
48
|
+
"comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " +
|
49
|
+
"debug dec describe dialog did didtok disable disconnect dlevel dline dll " +
|
50
|
+
"dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " +
|
51
|
+
"drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " +
|
52
|
+
"events exit fclose filter findtext finger firewall flash flist flood flush " +
|
53
|
+
"flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " +
|
54
|
+
"gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " +
|
55
|
+
"halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " +
|
56
|
+
"ialmark identd if ignore iline inc invite iuser join kick linesep links list " +
|
57
|
+
"load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " +
|
58
|
+
"notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " +
|
59
|
+
"qme qmsg query queryn quit raw reload remini remote remove rename renwin " +
|
60
|
+
"reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " +
|
61
|
+
"say scid scon server set showmirc signam sline sockaccept sockclose socklist " +
|
62
|
+
"socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " +
|
63
|
+
"sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " +
|
64
|
+
"toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " +
|
65
|
+
"var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " +
|
66
|
+
"isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " +
|
67
|
+
"isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " +
|
68
|
+
"elseif else goto menu nicklist status title icon size option text edit " +
|
69
|
+
"button check radio box scroll list combo link tab item");
|
70
|
+
var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch");
|
71
|
+
var isOperatorChar = /[+\-*&%=<>!?^\/\|]/;
|
72
|
+
function chain(stream, state, f) {
|
73
|
+
state.tokenize = f;
|
74
|
+
return f(stream, state);
|
75
|
+
}
|
76
|
+
function tokenBase(stream, state) {
|
77
|
+
var beforeParams = state.beforeParams;
|
78
|
+
state.beforeParams = false;
|
79
|
+
var ch = stream.next();
|
80
|
+
if (/[\[\]{}\(\),\.]/.test(ch)) {
|
81
|
+
if (ch == "(" && beforeParams) state.inParams = true;
|
82
|
+
else if (ch == ")") state.inParams = false;
|
83
|
+
return null;
|
84
|
+
}
|
85
|
+
else if (/\d/.test(ch)) {
|
86
|
+
stream.eatWhile(/[\w\.]/);
|
87
|
+
return "number";
|
88
|
+
}
|
89
|
+
else if (ch == "\\") {
|
90
|
+
stream.eat("\\");
|
91
|
+
stream.eat(/./);
|
92
|
+
return "number";
|
93
|
+
}
|
94
|
+
else if (ch == "/" && stream.eat("*")) {
|
95
|
+
return chain(stream, state, tokenComment);
|
96
|
+
}
|
97
|
+
else if (ch == ";" && stream.match(/ *\( *\(/)) {
|
98
|
+
return chain(stream, state, tokenUnparsed);
|
99
|
+
}
|
100
|
+
else if (ch == ";" && !state.inParams) {
|
101
|
+
stream.skipToEnd();
|
102
|
+
return "comment";
|
103
|
+
}
|
104
|
+
else if (ch == '"') {
|
105
|
+
stream.eat(/"/);
|
106
|
+
return "keyword";
|
107
|
+
}
|
108
|
+
else if (ch == "$") {
|
109
|
+
stream.eatWhile(/[$_a-z0-9A-Z\.:]/);
|
110
|
+
if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {
|
111
|
+
return "keyword";
|
112
|
+
}
|
113
|
+
else {
|
114
|
+
state.beforeParams = true;
|
115
|
+
return "builtin";
|
116
|
+
}
|
117
|
+
}
|
118
|
+
else if (ch == "%") {
|
119
|
+
stream.eatWhile(/[^,^\s^\(^\)]/);
|
120
|
+
state.beforeParams = true;
|
121
|
+
return "string";
|
122
|
+
}
|
123
|
+
else if (isOperatorChar.test(ch)) {
|
124
|
+
stream.eatWhile(isOperatorChar);
|
125
|
+
return "operator";
|
126
|
+
}
|
127
|
+
else {
|
128
|
+
stream.eatWhile(/[\w\$_{}]/);
|
129
|
+
var word = stream.current().toLowerCase();
|
130
|
+
if (keywords && keywords.propertyIsEnumerable(word))
|
131
|
+
return "keyword";
|
132
|
+
if (functions && functions.propertyIsEnumerable(word)) {
|
133
|
+
state.beforeParams = true;
|
134
|
+
return "keyword";
|
135
|
+
}
|
136
|
+
return null;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
function tokenComment(stream, state) {
|
140
|
+
var maybeEnd = false, ch;
|
141
|
+
while (ch = stream.next()) {
|
142
|
+
if (ch == "/" && maybeEnd) {
|
143
|
+
state.tokenize = tokenBase;
|
144
|
+
break;
|
145
|
+
}
|
146
|
+
maybeEnd = (ch == "*");
|
147
|
+
}
|
148
|
+
return "comment";
|
149
|
+
}
|
150
|
+
function tokenUnparsed(stream, state) {
|
151
|
+
var maybeEnd = 0, ch;
|
152
|
+
while (ch = stream.next()) {
|
153
|
+
if (ch == ";" && maybeEnd == 2) {
|
154
|
+
state.tokenize = tokenBase;
|
155
|
+
break;
|
156
|
+
}
|
157
|
+
if (ch == ")")
|
158
|
+
maybeEnd++;
|
159
|
+
else if (ch != " ")
|
160
|
+
maybeEnd = 0;
|
161
|
+
}
|
162
|
+
return "meta";
|
163
|
+
}
|
164
|
+
return {
|
165
|
+
startState: function() {
|
166
|
+
return {
|
167
|
+
tokenize: tokenBase,
|
168
|
+
beforeParams: false,
|
169
|
+
inParams: false
|
170
|
+
};
|
171
|
+
},
|
172
|
+
token: function(stream, state) {
|
173
|
+
if (stream.eatSpace()) return null;
|
174
|
+
return state.tokenize(stream, state);
|
175
|
+
}
|
176
|
+
};
|
177
|
+
});
|
@@ -1,22 +1,22 @@
|
|
1
1
|
/**********************************************************
|
2
|
-
* This script provides syntax highlighting support for
|
2
|
+
* This script provides syntax highlighting support for
|
3
3
|
* the Ntriples format.
|
4
|
-
* Ntriples format specification:
|
4
|
+
* Ntriples format specification:
|
5
5
|
* http://www.w3.org/TR/rdf-testcases/#ntriples
|
6
6
|
***********************************************************/
|
7
7
|
|
8
|
-
/*
|
8
|
+
/*
|
9
9
|
The following expression defines the defined ASF grammar transitions.
|
10
10
|
|
11
11
|
pre_subject ->
|
12
12
|
{
|
13
13
|
( writing_subject_uri | writing_bnode_uri )
|
14
|
-
-> pre_predicate
|
15
|
-
-> writing_predicate_uri
|
16
|
-
-> pre_object
|
17
|
-
-> writing_object_uri | writing_object_bnode |
|
18
|
-
(
|
19
|
-
writing_object_literal
|
14
|
+
-> pre_predicate
|
15
|
+
-> writing_predicate_uri
|
16
|
+
-> pre_object
|
17
|
+
-> writing_object_uri | writing_object_bnode |
|
18
|
+
(
|
19
|
+
writing_object_literal
|
20
20
|
-> writing_literal_lang | writing_literal_type
|
21
21
|
)
|
22
22
|
-> post_object
|
@@ -25,7 +25,7 @@
|
|
25
25
|
-> ERROR
|
26
26
|
}
|
27
27
|
*/
|
28
|
-
CodeMirror.defineMode("ntriples", function() {
|
28
|
+
CodeMirror.defineMode("ntriples", function() {
|
29
29
|
|
30
30
|
var Location = {
|
31
31
|
PRE_SUBJECT : 0,
|
@@ -45,7 +45,7 @@ CodeMirror.defineMode("ntriples", function() {
|
|
45
45
|
function transitState(currState, c) {
|
46
46
|
var currLocation = currState.location;
|
47
47
|
var ret;
|
48
|
-
|
48
|
+
|
49
49
|
// Opening.
|
50
50
|
if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;
|
51
51
|
else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;
|
@@ -53,7 +53,7 @@ CodeMirror.defineMode("ntriples", function() {
|
|
53
53
|
else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI;
|
54
54
|
else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE;
|
55
55
|
else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL;
|
56
|
-
|
56
|
+
|
57
57
|
// Closing.
|
58
58
|
else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED;
|
59
59
|
else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED;
|
@@ -63,33 +63,33 @@ CodeMirror.defineMode("ntriples", function() {
|
|
63
63
|
else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ;
|
64
64
|
else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;
|
65
65
|
else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;
|
66
|
-
|
66
|
+
|
67
67
|
// Closing typed and language literal.
|
68
68
|
else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;
|
69
69
|
else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;
|
70
70
|
|
71
71
|
// Spaces.
|
72
|
-
else if( c == ' ' &&
|
72
|
+
else if( c == ' ' &&
|
73
73
|
(
|
74
|
-
currLocation == Location.PRE_SUBJECT ||
|
75
|
-
currLocation == Location.PRE_PRED ||
|
76
|
-
currLocation == Location.PRE_OBJ ||
|
74
|
+
currLocation == Location.PRE_SUBJECT ||
|
75
|
+
currLocation == Location.PRE_PRED ||
|
76
|
+
currLocation == Location.PRE_OBJ ||
|
77
77
|
currLocation == Location.POST_OBJ
|
78
78
|
)
|
79
79
|
) ret = currLocation;
|
80
|
-
|
80
|
+
|
81
81
|
// Reset.
|
82
|
-
else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;
|
83
|
-
|
82
|
+
else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;
|
83
|
+
|
84
84
|
// Error
|
85
85
|
else ret = Location.ERROR;
|
86
|
-
|
86
|
+
|
87
87
|
currState.location=ret;
|
88
88
|
}
|
89
89
|
|
90
90
|
return {
|
91
91
|
startState: function() {
|
92
|
-
return {
|
92
|
+
return {
|
93
93
|
location : Location.PRE_SUBJECT,
|
94
94
|
uris : [],
|
95
95
|
anchors : [],
|