| @@ 5923-5937 (lines=15) @@ | ||
| 5920 | return countColumn(this.string, null, this.tabSize) - |
|
| 5921 | (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); |
|
| 5922 | }, |
|
| 5923 | match: function(pattern, consume, caseInsensitive) { |
|
| 5924 | if (typeof pattern == "string") { |
|
| 5925 | var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; |
|
| 5926 | var substr = this.string.substr(this.pos, pattern.length); |
|
| 5927 | if (cased(substr) == cased(pattern)) { |
|
| 5928 | if (consume !== false) this.pos += pattern.length; |
|
| 5929 | return true; |
|
| 5930 | } |
|
| 5931 | } else { |
|
| 5932 | var match = this.string.slice(this.pos).match(pattern); |
|
| 5933 | if (match && match.index > 0) return null; |
|
| 5934 | if (match && consume !== false) this.pos += match[0].length; |
|
| 5935 | return match; |
|
| 5936 | } |
|
| 5937 | }, |
|
| 5938 | current: function(){return this.string.slice(this.start, this.pos);}, |
|
| 5939 | hideFirstChars: function(n, inner) { |
|
| 5940 | this.lineStart += n; |
|
| @@ 74-88 (lines=15) @@ | ||
| 71 | return countColumn(this.string, null, this.tabSize) - |
|
| 72 | (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); |
|
| 73 | }, |
|
| 74 | match: function(pattern, consume, caseInsensitive) { |
|
| 75 | if (typeof pattern == "string") { |
|
| 76 | var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; |
|
| 77 | var substr = this.string.substr(this.pos, pattern.length); |
|
| 78 | if (cased(substr) == cased(pattern)) { |
|
| 79 | if (consume !== false) this.pos += pattern.length; |
|
| 80 | return true; |
|
| 81 | } |
|
| 82 | } else { |
|
| 83 | var match = this.string.slice(this.pos).match(pattern); |
|
| 84 | if (match && match.index > 0) return null; |
|
| 85 | if (match && consume !== false) this.pos += match[0].length; |
|
| 86 | return match; |
|
| 87 | } |
|
| 88 | }, |
|
| 89 | current: function(){return this.string.slice(this.start, this.pos);}, |
|
| 90 | hideFirstChars: function(n, inner) { |
|
| 91 | this.lineStart += n; |
|
| @@ 48-62 (lines=15) @@ | ||
| 45 | backUp: function(n) {this.pos -= n;}, |
|
| 46 | column: function() {return this.start - this.lineStart;}, |
|
| 47 | indentation: function() {return 0;}, |
|
| 48 | match: function(pattern, consume, caseInsensitive) { |
|
| 49 | if (typeof pattern == "string") { |
|
| 50 | var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; |
|
| 51 | var substr = this.string.substr(this.pos, pattern.length); |
|
| 52 | if (cased(substr) == cased(pattern)) { |
|
| 53 | if (consume !== false) this.pos += pattern.length; |
|
| 54 | return true; |
|
| 55 | } |
|
| 56 | } else { |
|
| 57 | var match = this.string.slice(this.pos).match(pattern); |
|
| 58 | if (match && match.index > 0) return null; |
|
| 59 | if (match && consume !== false) this.pos += match[0].length; |
|
| 60 | return match; |
|
| 61 | } |
|
| 62 | }, |
|
| 63 | current: function(){return this.string.slice(this.start, this.pos);}, |
|
| 64 | hideFirstChars: function(n, inner) { |
|
| 65 | this.lineStart += n; |
|