Don't allow two equals for the same key
This commit is contained in:
@@ -192,6 +192,10 @@ func lexRvalue(l *lexer) stateFn {
|
||||
for {
|
||||
next := l.peek()
|
||||
switch next {
|
||||
case '.':
|
||||
return l.errorf("cannot start float with a dot")
|
||||
case '=':
|
||||
return l.errorf("cannot have multiple equals for the same key")
|
||||
case '[':
|
||||
l.depth += 1
|
||||
return lexLeftBracket
|
||||
@@ -234,10 +238,6 @@ func lexRvalue(l *lexer) stateFn {
|
||||
return lexNumber
|
||||
}
|
||||
|
||||
if next == '.' {
|
||||
return l.errorf("cannot start float with a dot")
|
||||
}
|
||||
|
||||
if isSpace(next) {
|
||||
l.ignore()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user