Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/cm_modes/livescript.js

Issue 2772343006: DevTools: Roll CodeMirror to 5.25.1 (Closed)
Patch Set: stray space Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // CodeMirror, copyright (c) by Marijn Haverbeke and others 1 // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 // Distributed under an MIT license: http://codemirror.net/LICENSE 2 // Distributed under an MIT license: http://codemirror.net/LICENSE
3 3
4 /** 4 /**
5 * Link to the project's GitHub page: 5 * Link to the project's GitHub page:
6 * https://github.com/duralog/CodeMirror 6 * https://github.com/duralog/CodeMirror
7 */ 7 */
8 8
9 (function(mod) { 9 (function(mod) {
10 if (typeof exports == "object" && typeof module == "object") // CommonJS 10 if (typeof exports == "object" && typeof module == "object") // CommonJS
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 } 44 }
45 } 45 }
46 stream.next(); 46 stream.next();
47 return 'error'; 47 return 'error';
48 }; 48 };
49 var external = { 49 var external = {
50 startState: function(){ 50 startState: function(){
51 return { 51 return {
52 next: 'start', 52 next: 'start',
53 lastToken: null 53 lastToken: {style: null, indent: 0, content: ""}
54 }; 54 };
55 }, 55 },
56 token: function(stream, state){ 56 token: function(stream, state){
57 while (stream.pos == stream.start) 57 while (stream.pos == stream.start)
58 var style = tokenBase(stream, state); 58 var style = tokenBase(stream, state);
59 state.lastToken = { 59 state.lastToken = {
60 style: style, 60 style: style,
61 indent: stream.indentation(), 61 indent: stream.indentation(),
62 content: stream.current() 62 content: stream.current()
63 }; 63 };
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 } 272 }
273 } else if (typeof rr.regex === 'string') { 273 } else if (typeof rr.regex === 'string') {
274 Rules[idx].regex = new RegExp('^' + r.regex); 274 Rules[idx].regex = new RegExp('^' + r.regex);
275 } 275 }
276 } 276 }
277 277
278 CodeMirror.defineMIME('text/x-livescript', 'livescript'); 278 CodeMirror.defineMIME('text/x-livescript', 'livescript');
279 279
280 }); 280 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698