This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package example | |
| sealed trait ArithExpr | |
| case class Number(value: Double) extends ArithExpr | |
| case class BinaryOp(op: String, lhs: ArithExpr, rhs: ArithExpr) extends ArithExpr | |
| /** Parse an arithmetic expression from a list of tokens, using recursive descent. | |
| * | |
| * This is bad scala style (e.g. I should use options). Right now, |
NewerOlder