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

Method nextTokenCanFollowDefaultKeyword

internal/parser/parser.go:3993–4003  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3991}
3992
3993func (p *Parser) nextTokenCanFollowDefaultKeyword() bool {
3994 switch p.nextToken() {
3995 case ast.KindClassKeyword, ast.KindFunctionKeyword, ast.KindInterfaceKeyword, ast.KindAtToken:
3996 return true
3997 case ast.KindAbstractKeyword:
3998 return p.lookAhead((*Parser).nextTokenIsClassKeywordOnSameLine)
3999 case ast.KindAsyncKeyword:
4000 return p.lookAhead((*Parser).nextTokenIsFunctionKeywordOnSameLine)
4001 }
4002 return false
4003}
4004
4005func (p *Parser) nextTokenIsIdentifierOrKeyword() bool {
4006 return tokenIsIdentifierOrKeyword(p.nextToken())

Callers 1

Calls 2

nextTokenMethod · 0.95
lookAheadMethod · 0.95

Tested by

no test coverage detected