json-pawarser: make return of object grammar easier to understand
This commit is contained in:
parent
fcf91f25e3
commit
662cb8ba0e
1 changed files with 3 additions and 3 deletions
|
@ -23,10 +23,10 @@ pub(super) fn object(p: &mut Parser) -> Option<CompletedMarker> {
|
|||
}
|
||||
}
|
||||
|
||||
Some(if !p.eat(SyntaxKind::BRACE_CLOSE) {
|
||||
obj_start.error(p, SyntaxError::UnclosedObject)
|
||||
} else {
|
||||
Some(if p.eat(SyntaxKind::BRACE_CLOSE) {
|
||||
obj_start.complete(p, SyntaxKind::OBJECT)
|
||||
} else {
|
||||
obj_start.error(p, SyntaxError::UnclosedObject)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue