From 01445469166865e8f5e1b054a566b1c9cd6fc52e Mon Sep 17 00:00:00 2001 From: Seungmin Jeon Date: Fri, 16 Sep 2022 14:07:16 +0900 Subject: [PATCH] Add comment for operator associativity --- src/assignments/assignment04/parser.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/assignments/assignment04/parser.rs b/src/assignments/assignment04/parser.rs index 599094e..64c9a98 100644 --- a/src/assignments/assignment04/parser.rs +++ b/src/assignments/assignment04/parser.rs @@ -14,6 +14,12 @@ mod inner { } /// Parses command. +/// +/// ## Operator Associativty +/// +/// For associativity of each operator, please follow [here](https://docs.rs/pest/latest/pest/prec_climber/struct.PrecClimber.html#examples). +/// +/// e.g. `1+2+3` should be parsed into `(1+2)+3`, not `1+(2+3)` because the associativity of plus("add" in our hw) operator is `Left`. pub fn parse_command(line: &str) -> Result { todo!("fill here") }