Skip to content

Commit 5f23357

Browse files
authored
Merge pull request #369 from unlessgames/lax-colon
Allow space before colon in Maps
2 parents 18dbc35 + 25ba4d3 commit 5f23357

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/parser/src/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1934,8 +1934,8 @@ impl<'source> Parser<'source> {
19341934
break;
19351935
};
19361936

1937-
if self.peek_token() == Some(Token::Colon) {
1938-
self.consume_token();
1937+
if self.peek_next_token_on_same_line() == Some(Token::Colon) {
1938+
self.consume_next_token_on_same_line();
19391939

19401940
let value_context = ExpressionContext::permissive();
19411941
if self.peek_token_with_context(&value_context).is_none() {

0 commit comments

Comments
 (0)