diff --git a/src/syntax/binding.rs b/src/syntax/binding.rs index a7dc6f3..11a2d29 100644 --- a/src/syntax/binding.rs +++ b/src/syntax/binding.rs @@ -7,6 +7,7 @@ use crate::utils::Result3; pub fn try_parse<'a>(tokens: &'a Vec, pos: usize) -> ParseResult { let mut current_pos = pos; + /* * val/var keyword */ @@ -80,8 +81,9 @@ pub fn try_parse<'a>(tokens: &'a Vec, pos: usize) -> ParseResult (exp, next), _ => { return ParseResult::Err(SyntaxError { @@ -91,6 +93,7 @@ pub fn try_parse<'a>(tokens: &'a Vec, pos: usize) -> ParseResult(tokens: &'a Vec, pos: usize) -> ParseResult, pos: usize) -> ParseResult { - /* match function_call::try_parse(tokens, pos) { - super::ParseResult::Ok(_, _) => todo!(), - super::ParseResult::Err(_) => todo!(), - super::ParseResult::Mismatch(_) => todo!(), - super::ParseResult::Unmatched => todo!(), - } - */ + super::ParseResult::Ok(function_call, next_pos) => { + return ParseResult::Ok::<_, ()>(Expression::FunctionCall(function_call), next_pos) + } + _ => {} + }; match tokens.get(pos) { Some(token) => match token.token_type {