diff --git a/src/parser.rs b/src/parser.rs index fe2c143..15b581d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -260,8 +260,8 @@ impl Parser { /// Parse the following rule: /// ``` - /// term := factor "+" factor - /// term := factor "-" factor + /// term := factor ( "+" factor )* + /// term := factor ( "-" factor )* /// ``` fn parse_term(&mut self) -> ParserResult { let mut expr = self.parse_factor()?; @@ -278,8 +278,8 @@ impl Parser { /// Parse the following rule: /// ``` - /// factor := unary "*" unary - /// factor := unary "/" unary + /// factor := unary ( "*" unary )* + /// factor := unary ( "/" unary )* /// ``` fn parse_factor(&mut self) -> ParserResult { let mut expr = self.parse_unary()?;