Fix dangling bracket and parens eof bugs in config parser

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
This commit is contained in:
Waldemar Quevedo
2019-01-28 17:20:03 -08:00
parent ed94bd9f27
commit c3a441f6ec
2 changed files with 47 additions and 0 deletions

View File

@@ -656,6 +656,8 @@ func lexMapKeyStart(lx *lexer) stateFn {
case r == dqStringStart:
lx.next()
return lexSkip(lx, lexMapDubQuotedKey)
case r == eof:
return lx.errorf("Unexpected EOF processing map.")
}
lx.ignore()
lx.next()
@@ -898,6 +900,8 @@ func lexBlock(lx *lexer) stateFn {
return lx.pop()
}
lx.backup()
case r == eof:
return lx.errorf("Unexpected EOF processing block.")
}
return lexBlock
}