mirror of
https://github.com/kmc7468/cs220.git
synced 2025-12-14 22:18:46 +00:00
Add comment for operator associativity
This commit is contained in:
@@ -14,6 +14,12 @@ mod inner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Parses command.
|
/// 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<Command> {
|
pub fn parse_command(line: &str) -> Result<Command> {
|
||||||
todo!("fill here")
|
todo!("fill here")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user