| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |