File: error.go

package info (click to toggle)
golang-github-hashicorp-hcl 0.0~git20161215.0.80e628d-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch, stretch-backports
  • size: 948 kB
  • sloc: makefile: 22
file content (17 lines) | stat: -rw-r--r-- 266 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
}