fixed parser infinite looping because parse_function() on a function with no args (fn my_func() {}) would break before the ')'.

This commit is contained in:
Dummi26 2023-04-15 15:41:07 +02:00
parent 65fdc87c01
commit c484d2cbb2

View File

@ -760,7 +760,10 @@ fn parse_function(
let mut args = Vec::new(); let mut args = Vec::new();
loop { loop {
match file.peek() { match file.peek() {
Some(')') => break, Some(')') => {
file.next();
break;
}
_ => (), _ => (),
} }
let mut arg_name = String::new(); let mut arg_name = String::new();