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

Function isLeftHandSideExpressionKind

internal/ast/utilities.go:396–408  ·  view source on GitHub ↗
(kind Kind)

Source from the content-addressed store, hash-verified

394}
395
396func isLeftHandSideExpressionKind(kind Kind) bool {
397 switch kind {
398 case KindPropertyAccessExpression, KindElementAccessExpression, KindNewExpression, KindCallExpression,
399 KindJsxElement, KindJsxSelfClosingElement, KindJsxFragment, KindTaggedTemplateExpression, KindArrayLiteralExpression,
400 KindParenthesizedExpression, KindObjectLiteralExpression, KindClassExpression, KindFunctionExpression, KindIdentifier,
401 KindPrivateIdentifier, KindRegularExpressionLiteral, KindNumericLiteral, KindBigIntLiteral, KindStringLiteral,
402 KindNoSubstitutionTemplateLiteral, KindTemplateExpression, KindFalseKeyword, KindNullKeyword, KindThisKeyword,
403 KindTrueKeyword, KindSuperKeyword, KindNonNullExpression, KindExpressionWithTypeArguments, KindMetaProperty,
404 KindImportKeyword, KindMissingDeclaration:
405 return true
406 }
407 return false
408}
409
410// Determines whether a node is a LeftHandSideExpression based only on its kind.
411func IsLeftHandSideExpression(node *Node) bool {

Callers 2

IsLeftHandSideExpressionFunction · 0.70
isUnaryExpressionKindFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected