OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / hashicorp / hcl / hcl / parser / error.go
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 (file)
index 0000000..5c99381
--- /dev/null
@@ -0,0 +1,17 @@
+package parser
+
+import (
+       "fmt"
+
+       "github.com/hashicorp/hcl/hcl/token"
+)
+
+// PosError is a parse error that contains a position.
+type PosError struct {
+       Pos token.Pos
+       Err error
+}
+
+func (e *PosError) Error() string {
+       return fmt.Sprintf("At %s: %s", e.Pos, e.Err)
+}