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

Method isStartOfLeftHandSideExpression

internal/parser/parser.go:6197–6208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6195}
6196
6197func (p *Parser) isStartOfLeftHandSideExpression() bool {
6198 switch p.token {
6199 case ast.KindThisKeyword, ast.KindSuperKeyword, ast.KindNullKeyword, ast.KindTrueKeyword, ast.KindFalseKeyword,
6200 ast.KindNumericLiteral, ast.KindBigIntLiteral, ast.KindStringLiteral, ast.KindNoSubstitutionTemplateLiteral, ast.KindTemplateHead,
6201 ast.KindOpenParenToken, ast.KindOpenBracketToken, ast.KindOpenBraceToken, ast.KindFunctionKeyword, ast.KindClassKeyword,
6202 ast.KindNewKeyword, ast.KindSlashToken, ast.KindSlashEqualsToken, ast.KindIdentifier:
6203 return true
6204 case ast.KindImportKeyword:
6205 return p.isNextTokenOpenParenOrLessThanOrDot()
6206 }
6207 return p.isIdentifier()
6208}
6209
6210func (p *Parser) isStartOfType(inStartOfParameter bool) bool {
6211 switch p.token {

Callers 2

isListElementMethod · 0.95
isStartOfExpressionMethod · 0.95

Calls 2

isIdentifierMethod · 0.95

Tested by

no test coverage detected