summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/hcl/hcl/parser
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/github.com/hashicorp/hcl/hcl/parser
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/github.com/hashicorp/hcl/hcl/parser')
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go9
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/parser.go6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go575
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl42
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl42
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl0
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hclbin10 -> 0 bytes
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl6
33 files changed, 6 insertions, 775 deletions
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go
deleted file mode 100644
index 32399fec5..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package parser
-
-import (
- "testing"
-)
-
-func TestPosError_impl(t *testing.T) {
- var _ error = new(PosError)
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
index 098e1bc49..64c83bcfb 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
@@ -205,6 +205,12 @@ func (p *Parser) objectItem() (*ast.ObjectItem, error) {
}
}
+ // key=#comment
+ // val
+ if p.lineComment != nil {
+ o.LineComment, p.lineComment = p.lineComment, nil
+ }
+
// do a look-ahead for line comment
p.scan()
if len(keys) > 0 && o.Val.Pos().Line == keys[0].Pos().Line && p.lineComment != nil {
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go
deleted file mode 100644
index 270212207..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go
+++ /dev/null
@@ -1,575 +0,0 @@
-package parser
-
-import (
- "fmt"
- "io/ioutil"
- "path/filepath"
- "reflect"
- "runtime"
- "strings"
- "testing"
-
- "github.com/hashicorp/hcl/hcl/ast"
- "github.com/hashicorp/hcl/hcl/token"
-)
-
-func TestType(t *testing.T) {
- var literals = []struct {
- typ token.Type
- src string
- }{
- {token.STRING, `foo = "foo"`},
- {token.NUMBER, `foo = 123`},
- {token.NUMBER, `foo = -29`},
- {token.FLOAT, `foo = 123.12`},
- {token.FLOAT, `foo = -123.12`},
- {token.BOOL, `foo = true`},
- {token.HEREDOC, "foo = <<EOF\nHello\nWorld\nEOF"},
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- lit, ok := item.Val.(*ast.LiteralType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if lit.Token.Type != l.typ {
- t.Errorf("want: %s, got: %s", l.typ, lit.Token.Type)
- }
- }
-}
-
-func TestListType(t *testing.T) {
- var literals = []struct {
- src string
- tokens []token.Type
- }{
- {
- `foo = ["123", 123]`,
- []token.Type{token.STRING, token.NUMBER},
- },
- {
- `foo = [123, "123",]`,
- []token.Type{token.NUMBER, token.STRING},
- },
- {
- `foo = [false]`,
- []token.Type{token.BOOL},
- },
- {
- `foo = []`,
- []token.Type{},
- },
- {
- `foo = [1,
-"string",
-<<EOF
-heredoc contents
-EOF
-]`,
- []token.Type{token.NUMBER, token.STRING, token.HEREDOC},
- },
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- tokens := []token.Type{}
- for _, li := range list.List {
- if tp, ok := li.(*ast.LiteralType); ok {
- tokens = append(tokens, tp.Token.Type)
- }
- }
-
- equals(t, l.tokens, tokens)
- }
-}
-
-func TestListOfMaps(t *testing.T) {
- src := `foo = [
- {key = "bar"},
- {key = "baz", key2 = "qux"},
- ]`
- p := newParser([]byte(src))
-
- file, err := p.Parse()
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- // Here we make all sorts of assumptions about the input structure w/ type
- // assertions. The intent is only for this to be a "smoke test" ensuring
- // parsing actually performed its duty - giving this test something a bit
- // more robust than _just_ "no error occurred".
- expected := []string{`"bar"`, `"baz"`, `"qux"`}
- actual := make([]string, 0, 3)
- ol := file.Node.(*ast.ObjectList)
- objItem := ol.Items[0]
- list := objItem.Val.(*ast.ListType)
- for _, node := range list.List {
- obj := node.(*ast.ObjectType)
- for _, item := range obj.List.Items {
- val := item.Val.(*ast.LiteralType)
- actual = append(actual, val.Token.Text)
- }
-
- }
- if !reflect.DeepEqual(expected, actual) {
- t.Fatalf("Expected: %#v, got %#v", expected, actual)
- }
-}
-
-func TestListOfMaps_requiresComma(t *testing.T) {
- src := `foo = [
- {key = "bar"}
- {key = "baz"}
- ]`
- p := newParser([]byte(src))
-
- _, err := p.Parse()
- if err == nil {
- t.Fatalf("Expected error, got none!")
- }
-
- expected := "error parsing list, expected comma or list end"
- if !strings.Contains(err.Error(), expected) {
- t.Fatalf("Expected err:\n %s\nTo contain:\n %s\n", err, expected)
- }
-}
-
-func TestListType_leadComment(t *testing.T) {
- var literals = []struct {
- src string
- comment []string
- }{
- {
- `foo = [
- 1,
- # bar
- 2,
- 3,
- ]`,
- []string{"", "# bar", ""},
- },
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Fatal(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Fatalf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if len(list.List) != len(l.comment) {
- t.Fatalf("bad: %d", len(list.List))
- }
-
- for i, li := range list.List {
- lt := li.(*ast.LiteralType)
- comment := l.comment[i]
-
- if (lt.LeadComment == nil) != (comment == "") {
- t.Fatalf("bad: %#v", lt)
- }
-
- if comment == "" {
- continue
- }
-
- actual := lt.LeadComment.List[0].Text
- if actual != comment {
- t.Fatalf("bad: %q %q", actual, comment)
- }
- }
- }
-}
-
-func TestListType_lineComment(t *testing.T) {
- var literals = []struct {
- src string
- comment []string
- }{
- {
- `foo = [
- 1,
- 2, # bar
- 3,
- ]`,
- []string{"", "# bar", ""},
- },
- }
-
- for _, l := range literals {
- p := newParser([]byte(l.src))
- item, err := p.objectItem()
- if err != nil {
- t.Fatal(err)
- }
-
- list, ok := item.Val.(*ast.ListType)
- if !ok {
- t.Fatalf("node should be of type LiteralType, got: %T", item.Val)
- }
-
- if len(list.List) != len(l.comment) {
- t.Fatalf("bad: %d", len(list.List))
- }
-
- for i, li := range list.List {
- lt := li.(*ast.LiteralType)
- comment := l.comment[i]
-
- if (lt.LineComment == nil) != (comment == "") {
- t.Fatalf("bad: %s", lt)
- }
-
- if comment == "" {
- continue
- }
-
- actual := lt.LineComment.List[0].Text
- if actual != comment {
- t.Fatalf("bad: %q %q", actual, comment)
- }
- }
- }
-}
-
-func TestObjectType(t *testing.T) {
- var literals = []struct {
- src string
- nodeType []ast.Node
- itemLen int
- }{
- {
- `foo = {}`,
- nil,
- 0,
- },
- {
- `foo = {
- bar = "fatih"
- }`,
- []ast.Node{&ast.LiteralType{}},
- 1,
- },
- {
- `foo = {
- bar = "fatih"
- baz = ["arslan"]
- }`,
- []ast.Node{
- &ast.LiteralType{},
- &ast.ListType{},
- },
- 2,
- },
- {
- `foo = {
- bar {}
- }`,
- []ast.Node{
- &ast.ObjectType{},
- },
- 1,
- },
- {
- `foo {
- bar {}
- foo = true
- }`,
- []ast.Node{
- &ast.ObjectType{},
- &ast.LiteralType{},
- },
- 2,
- },
- }
-
- for _, l := range literals {
- t.Logf("Source: %s", l.src)
-
- p := newParser([]byte(l.src))
- // p.enableTrace = true
- item, err := p.objectItem()
- if err != nil {
- t.Error(err)
- continue
- }
-
- // we know that the ObjectKey name is foo for all cases, what matters
- // is the object
- obj, ok := item.Val.(*ast.ObjectType)
- if !ok {
- t.Errorf("node should be of type LiteralType, got: %T", item.Val)
- continue
- }
-
- // check if the total length of items are correct
- equals(t, l.itemLen, len(obj.List.Items))
-
- // check if the types are correct
- for i, item := range obj.List.Items {
- equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val))
- }
- }
-}
-
-func TestObjectKey(t *testing.T) {
- keys := []struct {
- exp []token.Type
- src string
- }{
- {[]token.Type{token.IDENT}, `foo {}`},
- {[]token.Type{token.IDENT}, `foo = {}`},
- {[]token.Type{token.IDENT}, `foo = bar`},
- {[]token.Type{token.IDENT}, `foo = 123`},
- {[]token.Type{token.IDENT}, `foo = "${var.bar}`},
- {[]token.Type{token.STRING}, `"foo" {}`},
- {[]token.Type{token.STRING}, `"foo" = {}`},
- {[]token.Type{token.STRING}, `"foo" = "${var.bar}`},
- {[]token.Type{token.IDENT, token.IDENT}, `foo bar {}`},
- {[]token.Type{token.IDENT, token.STRING}, `foo "bar" {}`},
- {[]token.Type{token.STRING, token.IDENT}, `"foo" bar {}`},
- {[]token.Type{token.IDENT, token.IDENT, token.IDENT}, `foo bar baz {}`},
- }
-
- for _, k := range keys {
- p := newParser([]byte(k.src))
- keys, err := p.objectKey()
- if err != nil {
- t.Fatal(err)
- }
-
- tokens := []token.Type{}
- for _, o := range keys {
- tokens = append(tokens, o.Token.Type)
- }
-
- equals(t, k.exp, tokens)
- }
-
- errKeys := []struct {
- src string
- }{
- {`foo 12 {}`},
- {`foo bar = {}`},
- {`foo []`},
- {`12 {}`},
- }
-
- for _, k := range errKeys {
- p := newParser([]byte(k.src))
- _, err := p.objectKey()
- if err == nil {
- t.Errorf("case '%s' should give an error", k.src)
- }
- }
-}
-
-func TestCommentGroup(t *testing.T) {
- var cases = []struct {
- src string
- groups int
- }{
- {"# Hello\n# World", 1},
- {"# Hello\r\n# Windows", 1},
- }
-
- for _, tc := range cases {
- t.Run(tc.src, func(t *testing.T) {
- p := newParser([]byte(tc.src))
- file, err := p.Parse()
- if err != nil {
- t.Fatalf("parse error: %s", err)
- }
-
- if len(file.Comments) != tc.groups {
- t.Fatalf("bad: %#v", file.Comments)
- }
- })
- }
-}
-
-// Official HCL tests
-func TestParse(t *testing.T) {
- cases := []struct {
- Name string
- Err bool
- }{
- {
- "assign_colon.hcl",
- true,
- },
- {
- "comment.hcl",
- false,
- },
- {
- "comment_crlf.hcl",
- false,
- },
- {
- "comment_lastline.hcl",
- false,
- },
- {
- "comment_single.hcl",
- false,
- },
- {
- "empty.hcl",
- false,
- },
- {
- "list_comma.hcl",
- false,
- },
- {
- "multiple.hcl",
- false,
- },
- {
- "object_list_comma.hcl",
- false,
- },
- {
- "structure.hcl",
- false,
- },
- {
- "structure_basic.hcl",
- false,
- },
- {
- "structure_empty.hcl",
- false,
- },
- {
- "complex.hcl",
- false,
- },
- {
- "complex_crlf.hcl",
- false,
- },
- {
- "types.hcl",
- false,
- },
- {
- "array_comment.hcl",
- false,
- },
- {
- "array_comment_2.hcl",
- true,
- },
- {
- "missing_braces.hcl",
- true,
- },
- {
- "unterminated_object.hcl",
- true,
- },
- {
- "unterminated_object_2.hcl",
- true,
- },
- {
- "key_without_value.hcl",
- true,
- },
- {
- "object_key_without_value.hcl",
- true,
- },
- {
- "object_key_assign_without_value.hcl",
- true,
- },
- {
- "object_key_assign_without_value2.hcl",
- true,
- },
- {
- "object_key_assign_without_value3.hcl",
- true,
- },
- {
- "git_crypt.hcl",
- true,
- },
- }
-
- const fixtureDir = "./test-fixtures"
-
- for _, tc := range cases {
- t.Run(tc.Name, func(t *testing.T) {
- d, err := ioutil.ReadFile(filepath.Join(fixtureDir, tc.Name))
- if err != nil {
- t.Fatalf("err: %s", err)
- }
-
- v, err := Parse(d)
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %s\n\nError: %s\n\nAST: %#v", tc.Name, err, v)
- }
- })
- }
-}
-
-func TestParse_inline(t *testing.T) {
- cases := []struct {
- Value string
- Err bool
- }{
- {"t t e{{}}", true},
- {"o{{}}", true},
- {"t t e d N{{}}", true},
- {"t t e d{{}}", true},
- {"N{}N{{}}", true},
- {"v\nN{{}}", true},
- {"v=/\n[,", true},
- {"v=10kb", true},
- {"v=/foo", true},
- }
-
- for _, tc := range cases {
- t.Logf("Testing: %q", tc.Value)
- ast, err := Parse([]byte(tc.Value))
- if (err != nil) != tc.Err {
- t.Fatalf("Input: %q\n\nError: %s\n\nAST: %#v", tc.Value, err, ast)
- }
- }
-}
-
-// equals fails the test if exp is not equal to act.
-func equals(tb testing.TB, exp, act interface{}) {
- if !reflect.DeepEqual(exp, act) {
- _, file, line, _ := runtime.Caller(1)
- fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act)
- tb.FailNow()
- }
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl
deleted file mode 100644
index 78c267582..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = [
- "1",
- "2", # comment
-]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl
deleted file mode 100644
index f91667738..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-provisioner "remote-exec" {
- scripts = [
- "${path.module}/scripts/install-consul.sh" // missing comma
- "${path.module}/scripts/install-haproxy.sh"
- ]
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl
deleted file mode 100644
index eb5a99a69..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-resource = [{
- "foo": {
- "bar": {},
- "baz": [1, 2, "foo"],
- }
-}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl
deleted file mode 100644
index dd3151cb7..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-resource = [{
- foo = [{
- bar = {}
- }]
-}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl
deleted file mode 100644
index e32be87ed..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl
+++ /dev/null
@@ -1,15 +0,0 @@
-// Foo
-
-/* Bar */
-
-/*
-/*
-Baz
-*/
-
-# Another
-
-# Multiple
-# Lines
-
-foo = "bar"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl
deleted file mode 100644
index 1ff7f29fd..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl
+++ /dev/null
@@ -1,15 +0,0 @@
-// Foo
-
-/* Bar */
-
-/*
-/*
-Baz
-*/
-
-# Another
-
-# Multiple
-# Lines
-
-foo = "bar"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl
deleted file mode 100644
index 5529b9b4c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl
+++ /dev/null
@@ -1 +0,0 @@
-#foo \ No newline at end of file
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl
deleted file mode 100644
index fec56017d..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl
+++ /dev/null
@@ -1 +0,0 @@
-# Hello
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl
deleted file mode 100644
index 13b3c2726..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl
+++ /dev/null
@@ -1,42 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-variable "groups" { }
-
-provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-
-provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
-}
-
-resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}",
- "${element(split(\",\", var.groups)}",
- ]
- network_interface = {
- device_index = 0
- description = "Main network interface"
- }
-}
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
- value = "${aws_instance.web.private_ip}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl
deleted file mode 100644
index 9b071d12b..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl
+++ /dev/null
@@ -1,42 +0,0 @@
-variable "foo" {
- default = "bar"
- description = "bar"
-}
-
-variable "groups" { }
-
-provider "aws" {
- access_key = "foo"
- secret_key = "bar"
-}
-
-provider "do" {
- api_key = "${var.foo}"
-}
-
-resource "aws_security_group" "firewall" {
- count = 5
-}
-
-resource aws_instance "web" {
- ami = "${var.foo}"
- security_groups = [
- "foo",
- "${aws_security_group.firewall.foo}",
- "${element(split(\",\", var.groups)}",
- ]
- network_interface = {
- device_index = 0
- description = "Main network interface"
- }
-}
-
-resource "aws_instance" "db" {
- security_groups = "${aws_security_group.firewall.*.id}"
- VPC = "foo"
- depends_on = ["aws_instance.web"]
-}
-
-output "web_ip" {
- value = "${aws_instance.web.private_ip}"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl
deleted file mode 100644
index 0007aaf5f..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl
deleted file mode 100644
index e69de29bb..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl
+++ /dev/null
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl
deleted file mode 100644
index f691948e1..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl
+++ /dev/null
Binary files differ
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl
deleted file mode 100644
index 257cc5642..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl
deleted file mode 100644
index 059d4ce65..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = [1, 2, "foo"]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl
deleted file mode 100644
index 50f4218ac..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = [1, 2, "foo",]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl
deleted file mode 100644
index 68e7274e6..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-# should error, but not crash
-resource "template_file" "cloud_config" {
- template = "$file("${path.module}/some/path")"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl
deleted file mode 100644
index 029c54b0c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo = "bar"
-key = 7
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl
deleted file mode 100644
index 37a2c7a06..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-foo {
- bar =
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl
deleted file mode 100644
index 83ec5e66e..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo {
- baz = 7
- bar =
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl
deleted file mode 100644
index 21136d1d5..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl
+++ /dev/null
@@ -1,4 +0,0 @@
-foo {
- bar =
- baz = 7
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl
deleted file mode 100644
index a9987318c..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-foo {
- bar
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl
deleted file mode 100644
index 1921ec8f2..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl
+++ /dev/null
@@ -1 +0,0 @@
-foo = {one = 1, two = 2}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl
deleted file mode 100644
index e9f77cae9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl
+++ /dev/null
@@ -1,3 +0,0 @@
-default = {
- "eu-west-1": "ami-b1cf19c6",
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl
deleted file mode 100644
index 92592fbb3..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-// This is a test structure for the lexer
-foo bar "baz" {
- key = 7
- foo = "bar"
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl
deleted file mode 100644
index 7229a1f01..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl
+++ /dev/null
@@ -1,5 +0,0 @@
-foo {
- value = 7
- "value" = 8
- "complex::value" = 9
-}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl
deleted file mode 100644
index 4d156ddea..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl
+++ /dev/null
@@ -1 +0,0 @@
-resource "foo" "bar" {}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl
deleted file mode 100644
index cf2747ea1..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl
+++ /dev/null
@@ -1,7 +0,0 @@
-foo = "bar"
-bar = 7
-baz = [1,2,3]
-foo = -12
-bar = 3.14159
-foo = true
-bar = false
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl
deleted file mode 100644
index 31b37c4f9..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl
+++ /dev/null
@@ -1,2 +0,0 @@
-foo "baz" {
- bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl
deleted file mode 100644
index 294e36d65..000000000
--- a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl
+++ /dev/null
@@ -1,6 +0,0 @@
-resource "aws_eip" "EIP1" { a { a { a { a { a {
- count = "1"
-
-resource "aws_eip" "EIP2" {
- count = "1"
-}