(name *ast.Node)
| 39 | } |
| 40 | |
| 41 | func (p *Parser) checkNonIdentifierName(name *ast.Node) *ast.Node { |
| 42 | if ast.IsIdentifier(name) && !scanner.IsValidIdentifier(name.AsIdentifier().Text) { |
| 43 | errLoc := name.Loc |
| 44 | if errLoc.Len() == 0 { // missing name, emit error on the character before the missing name node |
| 45 | errLoc = core.NewTextRange(name.Loc.Pos()-1, name.Loc.Pos()) |
| 46 | } |
| 47 | p.parseErrorAtRange(errLoc, diagnostics.Identifier_expected) |
| 48 | } |
| 49 | return name |
| 50 | } |
| 51 | |
| 52 | // Hosted tags find a host and add their children to the correct location under the host. |
| 53 | // Unhosted tags add synthetic nodes to the reparse list. |
no test coverage detected