()
| 5953 | } |
| 5954 | |
| 5955 | func (p *Parser) scanTypeMemberStart() bool { |
| 5956 | // Return true if we have the start of a signature member |
| 5957 | if p.token == ast.KindOpenParenToken || p.token == ast.KindLessThanToken || p.token == ast.KindGetKeyword || p.token == ast.KindSetKeyword { |
| 5958 | return true |
| 5959 | } |
| 5960 | idToken := false |
| 5961 | // Eat up all modifiers, but hold on to the last one in case it is actually an identifier |
| 5962 | for ast.IsModifierKind(p.token) { |
| 5963 | idToken = true |
| 5964 | p.nextToken() |
| 5965 | } |
| 5966 | // Index signatures and computed property names are type members |
| 5967 | if p.token == ast.KindOpenBracketToken { |
| 5968 | return true |
| 5969 | } |
| 5970 | // Try to get the first property-like token following all modifiers |
| 5971 | if p.isLiteralPropertyName() { |
| 5972 | idToken = true |
| 5973 | p.nextToken() |
| 5974 | } |
| 5975 | // If we were able to get any potential identifier, check that it is |
| 5976 | // the start of a member declaration |
| 5977 | if idToken { |
| 5978 | return p.token == ast.KindOpenParenToken || p.token == ast.KindLessThanToken || p.token == ast.KindQuestionToken || p.token == ast.KindColonToken || p.token == ast.KindCommaToken || p.canParseSemicolon() |
| 5979 | } |
| 5980 | return false |
| 5981 | } |
| 5982 | |
| 5983 | func (p *Parser) scanClassMemberStart() bool { |
| 5984 | idToken := ast.KindUnknown |
nothing calls this directly
no test coverage detected