mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 05:43:53 +01:00
fixed bug where the last item in a list would break the parser if it wasn't followed by a whitespace, ), or }. (added ] to the list of statement-breaking chars)
This commit is contained in:
parent
862418ce98
commit
1b43dfebda
@ -174,13 +174,13 @@ fn parse_statement_adv(
|
||||
} else {
|
||||
loop {
|
||||
match match file.peek() {
|
||||
Some(ch) if matches!(ch, '}' | ')' | '.') => Some(ch),
|
||||
Some(ch) if matches!(ch, '}' | ']' | ')' | '.') => Some(ch),
|
||||
_ => file.next(),
|
||||
} {
|
||||
Some('=') => {
|
||||
break parse_statement(file)?.output_to(start.trim().to_string());
|
||||
}
|
||||
Some(ch) if (ch.is_whitespace() || ch == '}' || ch == ')' || ch == '.') => {
|
||||
Some(ch) if ch.is_whitespace() || matches!(ch, '}' | ']' | ')' | '.') => {
|
||||
file.skip_whitespaces();
|
||||
if let Some('=') = file.peek() {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user