diff --git a/triton-isa/src/parser.rs b/triton-isa/src/parser.rs index 6a1f8ab7..9c1d054d 100644 --- a/triton-isa/src/parser.rs +++ b/triton-isa/src/parser.rs @@ -455,24 +455,10 @@ fn swap_instruction() -> impl Fn(&str) -> ParseResult> { } fn call_instruction<'a>() -> impl Fn(&'a str) -> ParseResult> { - let call_syntax = move |s: &'a str| { - let (s_label, _) = token1("call")(s)?; // require space before called label - let (s, addr) = label_addr(s_label)?; - let (s, _) = comment_or_whitespace1(s)?; // require space after called label - - Ok((s, addr)) - }; - - let bracket_syntax = move |s: &'a str| { - let (s, _) = tag("[")(s)?; - let (s, addr) = label_addr(s)?; - let (s, _) = token0("]")(s)?; - - Ok((s, addr)) - }; - move |s: &'a str| { - let (s, label) = alt((call_syntax, bracket_syntax))(s)?; + let (s, _) = token1("call")(s)?; + let (s, label) = label_addr(s)?; + let (s, _) = comment_or_whitespace1(s)?; // This check cannot be moved into `label_addr`, since `label_addr` is shared // between the scenarios `