(name string, stringNamed bool, isMethod bool)
| 2355 | ) |
| 2356 | |
| 2357 | func classifyPropertyName(name string, stringNamed bool, isMethod bool) propertyNameNodeKind { |
| 2358 | if isMethod && name == "new" { |
| 2359 | return propertyNameNodeKindStringLiteral |
| 2360 | } |
| 2361 | if scanner.IsIdentifierText(name, core.LanguageVariantStandard) { |
| 2362 | return propertyNameNodeKindIdentifier |
| 2363 | } |
| 2364 | return core.IfElse(!stringNamed && isNumericLiteralName(name) && jsnum.FromString(name) >= 0, propertyNameNodeKindNumericLiteral, propertyNameNodeKindStringLiteral) |
| 2365 | } |
| 2366 | |
| 2367 | func (b *NodeBuilderImpl) createPropertyNameNodeForIdentifierOrLiteral(name string, singleQuote bool, stringNamed bool, isMethod bool, symbol *ast.Symbol) *ast.Node { |
| 2368 | switch classifyPropertyName(name, stringNamed, isMethod) { |
no test coverage detected