aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go')
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go5
1 files changed, 5 insertions, 0 deletions
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()