mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +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 {
|
} else {
|
||||||
loop {
|
loop {
|
||||||
match match file.peek() {
|
match match file.peek() {
|
||||||
Some(ch) if matches!(ch, '}' | ')' | '.') => Some(ch),
|
Some(ch) if matches!(ch, '}' | ']' | ')' | '.') => Some(ch),
|
||||||
_ => file.next(),
|
_ => file.next(),
|
||||||
} {
|
} {
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
break parse_statement(file)?.output_to(start.trim().to_string());
|
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();
|
file.skip_whitespaces();
|
||||||
if let Some('=') = file.peek() {
|
if let Some('=') = file.peek() {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user