Lines Matching refs:pos
76 this.start = this.pos
78 if (this.pos >= this.input.length) return this.finishToken(tt.eof)
94 let code = this.input.charCodeAt(this.pos)
96 let next = this.input.charCodeAt(this.pos + 1)
102 let start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
103 if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
104 this.pos = end + 2
108 while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
114 this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
119 let start = this.pos
121 let ch = this.input.charCodeAt(this.pos+=startSkip)
122 while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
123 ++this.pos
124 ch = this.input.charCodeAt(this.pos)
127 this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
135 loop: while (this.pos < this.input.length) {
136 let ch = this.input.charCodeAt(this.pos)
139 ++this.pos
142 if (this.input.charCodeAt(this.pos + 1) === 10) {
143 ++this.pos
146 ++this.pos
149 this.lineStart = this.pos
153 switch (this.input.charCodeAt(this.pos + 1)) {
166 ++this.pos
180 this.end = this.pos
199 let next = this.input.charCodeAt(this.pos + 1)
201 let next2 = this.input.charCodeAt(this.pos + 2)
203 this.pos += 3
206 ++this.pos
212 let next = this.input.charCodeAt(this.pos + 1)
213 if (this.exprAllowed) {++this.pos; return this.readRegexp()}
219 let next = this.input.charCodeAt(this.pos + 1)
227 next = this.input.charCodeAt(this.pos + 2)
235 let next = this.input.charCodeAt(this.pos + 1)
242 let next = this.input.charCodeAt(this.pos + 1)
248 let next = this.input.charCodeAt(this.pos + 1)
250 if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
251 lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
264 let next = this.input.charCodeAt(this.pos + 1)
267 size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
268 if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
271 if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
272 this.input.charCodeAt(this.pos + 3) == 45) {
284 let next = this.input.charCodeAt(this.pos + 1)
285 …if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 …
287 this.pos += 2
301 case 40: ++this.pos; return this.finishToken(tt.parenL)
302 case 41: ++this.pos; return this.finishToken(tt.parenR)
303 case 59: ++this.pos; return this.finishToken(tt.semi)
304 case 44: ++this.pos; return this.finishToken(tt.comma)
305 case 91: ++this.pos; return this.finishToken(tt.bracketL)
306 case 93: ++this.pos; return this.finishToken(tt.bracketR)
307 case 123: ++this.pos; return this.finishToken(tt.braceL)
308 case 125: ++this.pos; return this.finishToken(tt.braceR)
309 case 58: ++this.pos; return this.finishToken(tt.colon)
310 case 63: ++this.pos; return this.finishToken(tt.question)
314 ++this.pos
318 let next = this.input.charCodeAt(this.pos + 1)
363 this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
367 let str = this.input.slice(this.pos, this.pos + size)
368 this.pos += size
389 let escaped, inClass, start = this.pos
391 if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression")
392 let ch = this.input.charAt(this.pos)
400 ++this.pos
402 let content = this.input.slice(start, this.pos)
403 ++this.pos
452 let start = this.pos, total = 0
454 let code = this.input.charCodeAt(this.pos), val
460 ++this.pos
463 if (this.pos === start || len != null && this.pos - start !== len) return null
469 this.pos += 2 // 0x
472 …if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after n…
479 let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
481 if (octal && this.pos == start + 1) octal = false
482 let next = this.input.charCodeAt(this.pos)
484 ++this.pos
487 next = this.input.charCodeAt(this.pos)
490 next = this.input.charCodeAt(++this.pos)
491 if (next === 43 || next === 45) ++this.pos // '+-'
495 …if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after n…
497 let str = this.input.slice(start, this.pos), val
508 let ch = this.input.charCodeAt(this.pos), code
512 let codePos = ++this.pos
513 code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
514 ++this.pos
530 let out = "", chunkStart = ++this.pos
532 if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant")
533 let ch = this.input.charCodeAt(this.pos)
536 out += this.input.slice(chunkStart, this.pos)
538 chunkStart = this.pos
541 ++this.pos
544 out += this.input.slice(chunkStart, this.pos++)
551 let out = "", chunkStart = this.pos
553 if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template")
554 let ch = this.input.charCodeAt(this.pos)
555 if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
556 if (this.pos === this.start && this.type === tt.template) {
558 this.pos += 2
561 ++this.pos
565 out += this.input.slice(chunkStart, this.pos)
569 out += this.input.slice(chunkStart, this.pos)
571 chunkStart = this.pos
573 out += this.input.slice(chunkStart, this.pos)
574 ++this.pos
577 if (this.input.charCodeAt(this.pos) === 10) ++this.pos
587 this.lineStart = this.pos
589 chunkStart = this.pos
591 ++this.pos
599 let ch = this.input.charCodeAt(++this.pos)
600 ++this.pos
610 case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
612 if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
616 let octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]
623 this.raise(this.pos - 2, "Octal literal in strict mode")
625 this.pos += octalStr.length - 1
635 let codePos = this.pos
649 let word = "", first = true, chunkStart = this.pos
651 while (this.pos < this.input.length) {
654 this.pos += ch <= 0xffff ? 1 : 2
657 word += this.input.slice(chunkStart, this.pos)
658 let escStart = this.pos
659 if (this.input.charCodeAt(++this.pos) != 117) // "u"
660 this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX")
661 ++this.pos
666 chunkStart = this.pos
672 return word + this.input.slice(chunkStart, this.pos)