()
| 67 | } |
| 68 | |
| 69 | func (p *templateParser) parseRoot() ([]Expression, hcl.Diagnostics) { |
| 70 | var exprs []Expression |
| 71 | var diags hcl.Diagnostics |
| 72 | |
| 73 | for { |
| 74 | next := p.Peek() |
| 75 | if _, isEnd := next.(*templateEndToken); isEnd { |
| 76 | break |
| 77 | } |
| 78 | |
| 79 | expr, exprDiags := p.parseExpr() |
| 80 | diags = append(diags, exprDiags...) |
| 81 | exprs = append(exprs, expr) |
| 82 | } |
| 83 | |
| 84 | return exprs, diags |
| 85 | } |
| 86 | |
| 87 | func (p *templateParser) parseExpr() (Expression, hcl.Diagnostics) { |
| 88 | next := p.Peek() |
no test coverage detected