ParseExpressionWithStartPos parses like json.ParseExpression, but unlike json.ParseExpression you can pass a start position of the given JSON expression as a hcl.Pos.
(src []byte, filename string, start hcl.Pos)
| 84 | // json.ParseExpression you can pass a start position of the given JSON |
| 85 | // expression as a hcl.Pos. |
| 86 | func ParseExpressionWithStartPos(src []byte, filename string, start hcl.Pos) (hcl.Expression, hcl.Diagnostics) { |
| 87 | node, diags := parseExpression(src, filename, start) |
| 88 | return &expression{src: node}, diags |
| 89 | } |
| 90 | |
| 91 | // ParseFile is a convenience wrapper around Parse that first attempts to load |
| 92 | // data from the given filename, passing the result to Parse if successful. |