MCPcopy Create free account
hub / github.com/microsoft/typescript-go / isAwaitExpression

Method isAwaitExpression

internal/parser/parser.go:5120–5129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5118}
5119
5120func (p *Parser) isAwaitExpression() bool {
5121 if p.token == ast.KindAwaitKeyword {
5122 if p.inAwaitContext() {
5123 return true
5124 }
5125 // here we are using similar heuristics as 'isYieldExpression'
5126 return p.lookAhead((*Parser).nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine)
5127 }
5128 return false
5129}
5130
5131func (p *Parser) parseAwaitExpression() *ast.Node {
5132 pos := p.nodePos()

Callers 2

visitFunction · 0.80

Calls 2

inAwaitContextMethod · 0.95
lookAheadMethod · 0.95

Tested by

no test coverage detected