()
| 3964 | } |
| 3965 | |
| 3966 | func (p *Parser) nextTokenCanFollowModifier() bool { |
| 3967 | switch p.token { |
| 3968 | case ast.KindConstKeyword: |
| 3969 | // 'const' is only a modifier if followed by 'enum'. |
| 3970 | return p.nextToken() == ast.KindEnumKeyword |
| 3971 | case ast.KindExportKeyword: |
| 3972 | p.nextToken() |
| 3973 | if p.token == ast.KindDefaultKeyword { |
| 3974 | return p.lookAhead((*Parser).nextTokenCanFollowDefaultKeyword) |
| 3975 | } |
| 3976 | if p.token == ast.KindTypeKeyword { |
| 3977 | return p.lookAhead((*Parser).nextTokenCanFollowExportModifier) |
| 3978 | } |
| 3979 | return p.canFollowExportModifier() |
| 3980 | case ast.KindDefaultKeyword: |
| 3981 | return p.nextTokenCanFollowDefaultKeyword() |
| 3982 | case ast.KindStaticKeyword: |
| 3983 | p.nextToken() |
| 3984 | return p.canFollowModifier() |
| 3985 | case ast.KindGetKeyword, ast.KindSetKeyword: |
| 3986 | p.nextToken() |
| 3987 | return p.canFollowGetOrSetKeyword() |
| 3988 | default: |
| 3989 | return p.nextTokenIsOnSameLineAndCanFollowModifier() |
| 3990 | } |
| 3991 | } |
| 3992 | |
| 3993 | func (p *Parser) nextTokenCanFollowDefaultKeyword() bool { |
| 3994 | switch p.nextToken() { |
no test coverage detected