aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/hashicorp/hcl
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/hcl')
-rw-r--r--vendor/github.com/hashicorp/hcl/README.md10
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/ast/ast.go3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go5
-rw-r--r--vendor/github.com/hashicorp/hcl/json/scanner/scanner.go2
4 files changed, 18 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/hcl/README.md b/vendor/github.com/hashicorp/hcl/README.md
index e292d59..c822332 100644
--- a/vendor/github.com/hashicorp/hcl/README.md
+++ b/vendor/github.com/hashicorp/hcl/README.md
@@ -103,6 +103,16 @@ variable "ami" {
description = "the AMI to use"
}
```
+This would be equivalent to the following json:
+``` json
+{
+ "variable": {
+ "ami": {
+ "description": "the AMI to use"
+ }
+ }
+}
+```
## Thanks
diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go
index 692ac24..ea3734f 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go
@@ -214,4 +214,5 @@ func (c *CommentGroup) Pos() token.Pos {
// GoStringer
//-------------------------------------------------------------------
-func (o *ObjectKey) GoString() string { return fmt.Sprintf("*%#v", *o) }
+func (o *ObjectKey) GoString() string { return fmt.Sprintf("*%#v", *o) }
+func (o *ObjectList) GoString() string { return fmt.Sprintf("*%#v", *o) }
diff --git a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
index b204165..0735d95 100644
--- a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
+++ b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
@@ -224,6 +224,11 @@ func (s *Scanner) Scan() token.Token {
func (s *Scanner) scanComment(ch rune) {
// single line comments
if ch == '#' || (ch == '/' && s.peek() != '*') {
+ if ch == '/' && s.peek() != '/' {
+ s.err("expected '/' for comment")
+ return
+ }
+
ch = s.next()
for ch != '\n' && ch >= 0 && ch != eof {
ch = s.next()
diff --git a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go
index 477f71f..dd5c72b 100644
--- a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go
+++ b/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go
@@ -296,7 +296,7 @@ func (s *Scanner) scanString() {
return
}
- if ch == '"' && braces == 0 {
+ if ch == '"' {
break
}