mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
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:
parent
65fdc87c01
commit
c484d2cbb2
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user