diff options
Diffstat (limited to 'vendor/github.com/hashicorp/hcl/hcl/parser/error.go')
-rw-r--r-- | vendor/github.com/hashicorp/hcl/hcl/parser/error.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error.go new file mode 100644 index 0000000..5c99381 --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/hcl/parser/error.go | |||
@@ -0,0 +1,17 @@ | |||
1 | package parser | ||
2 | |||
3 | import ( | ||
4 | "fmt" | ||
5 | |||
6 | "github.com/hashicorp/hcl/hcl/token" | ||
7 | ) | ||
8 | |||
9 | // PosError is a parse error that contains a position. | ||
10 | type PosError struct { | ||
11 | Pos token.Pos | ||
12 | Err error | ||
13 | } | ||
14 | |||
15 | func (e *PosError) Error() string { | ||
16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err) | ||
17 | } | ||