Lines Matching full:tt

1 import {types as tt} from "./tokentype"
19 while (this.type !== tt.eof) {
33 if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
50 if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async")
72 starttype = tt._var
81 …case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
82 case tt._debugger: return this.parseDebuggerStatement(node)
83 case tt._do: return this.parseDoStatement(node)
84 case tt._for: return this.parseForStatement(node)
85 case tt._function:
88 case tt._class:
91 case tt._if: return this.parseIfStatement(node)
92 case tt._return: return this.parseReturnStatement(node)
93 case tt._switch: return this.parseSwitchStatement(node)
94 case tt._throw: return this.parseThrowStatement(node)
95 case tt._try: return this.parseTryStatement(node)
96 case tt._const: case tt._var:
100 case tt._while: return this.parseWhileStatement(node)
101 case tt._with: return this.parseWithStatement(node)
102 case tt.braceL: return this.parseBlock()
103 case tt.semi: return this.parseEmptyStatement(node)
104 case tt._export:
105 case tt._import:
112 return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)
126 if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
135 if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
136 else if (this.type !== tt.name) this.unexpected()
166 this.expect(tt._while)
169 this.eat(tt.semi)
186 this.expect(tt.parenL)
187 if (this.type === tt.semi) return this.parseFor(node, null)
189 if (this.type === tt._var || this.type === tt._const || isLet) {
194 …if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init.d…
201 if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
218 return this.type === tt._function || this.isAsyncFunction()
226 …node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null
239 if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
248 this.expect(tt.braceL)
255 for (var cur, sawDefault = false; this.type != tt.braceR;) {
256 if (this.type === tt._case || this.type === tt._default) {
257 let isCase = this.type === tt._case
269 this.expect(tt.colon)
298 if (this.type === tt._catch) {
301 this.expect(tt.parenL)
304 this.expect(tt.parenR)
308 node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
346 let kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
378 this.expect(tt.braceL)
379 while (!this.eat(tt.braceR)) {
392 this.expect(tt.semi)
393 node.test = this.type === tt.semi ? null : this.parseExpression()
394 this.expect(tt.semi)
395 node.update = this.type === tt.parenR ? null : this.parseExpression()
396 this.expect(tt.parenR)
406 let type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
410 this.expect(tt.parenR)
424 if (this.eat(tt.eq)) {
426 …} else if (kind === "const" && !(this.type === tt._in || (this.options.ecmaVersion >= 6 && this.is…
428 …} else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("…
434 if (!this.eat(tt.comma)) break
450 node.generator = this.eat(tt.star)
455 isStatement = this.type == tt.name
467 if (!isStatement && this.type === tt.name)
481 this.expect(tt.parenL)
482 node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true)
491 if (isStatement == null) isStatement = this.type === tt.name
497 this.expect(tt.braceL)
498 while (!this.eat(tt.braceR)) {
499 if (this.eat(tt.semi)) continue
501 let isGenerator = this.eat(tt.star)
503 let isMaybeStatic = this.type === tt.name && this.value === "static"
505 method.static = isMaybeStatic && this.type !== tt.parenL
508 isGenerator = this.eat(tt.star)
512 … method.key.type === "Identifier" && method.key.name === "async" && this.type !== tt.parenL &&
521 …if (!isGenerator && !isAsync && key.type === "Identifier" && this.type !== tt.parenL && (key.name …
561 node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
565 node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
573 if (this.eat(tt.star)) {
575 node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
579 if (this.eat(tt._default)) { // export default ...
582 if (this.type === tt._function || (isAsync = this.isAsyncFunction())) {
587 } else if (this.type === tt._class) {
609 node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
670 this.expect(tt.braceL)
671 while (!this.eat(tt.braceR)) {
673 this.expect(tt.comma)
674 if (this.afterTrailingComma(tt.braceR)) break
691 if (this.type === tt.string) {
697 node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
707 if (this.type === tt.name) {
713 if (!this.eat(tt.comma)) return nodes
715 if (this.type === tt.star) {
724 this.expect(tt.braceL)
725 while (!this.eat(tt.braceR)) {
727 this.expect(tt.comma)
728 if (this.afterTrailingComma(tt.braceR)) break