Update layout open brace scanner logic
@@ -123,20 +123,27 @@ struct Scanner {
lexer->advance(lexer, true);
}
+ uint32_t column = lexer->get_column(lexer);
if (lexer->lookahead== '{') {
+ lexer->advance(lexer, true);
+ if (lexer->lookahead == '-') {
+ lexer->advance(lexer, true);
+ if (lexer->lookahead != '#') {
return false;
+ }
} else {
- uint32_t column = lexer->get_column(lexer);
- if (indent_length_stack.size() > 1 && column == indent_length_stack.back()) {
+ return false;
+ }
+ }
+
+ if (indent_length_stack.size() > 0 && column == indent_length_stack.back()) {
queued_close_brace_count++;
} else {
- lexer->mark_end(lexer);
indent_length_stack.push_back(column);
}
lexer->result_symbol = LAYOUT_OPEN_BRACE;
return true;
}
- }
while (lexer->lookahead == ' ' || lexer->lookahead == '\t') {
lexer->advance(lexer, true);
