package AST
Type Members
-
case class
Assign(tVariable: Variable, tValue: Expression) extends AST with Command with Product with Serializable
Assigns a right value to a variable
Assigns a right value to a variable
- tVariable
variable
- tValue
arithmetic expression
-
sealed
trait
Command extends AST
Base class for command ASTs
Base class for command ASTs
-
case class
If(tCondition: Expression, tThen: Command, tElse: Command) extends AST with Command with Product with Serializable
If condition
If condition
- tCondition
binary expression condition
- tThen
the command to apply if condition is true
- tElse
the command to apply if condition is false
-
case class
Sequence(tExpressions: List[Command]) extends AST with Command with Product with Serializable
A sequence of commands
A sequence of commands
- tExpressions
list of commands
-
case class
Skip() extends AST with Command with Product with Serializable
Do nothing
-
case class
While(tCondition: Expression, tExpression: Command) extends AST with Command with Product with Serializable
While loop
While loop
- tCondition
the condition to keep running the loop
- tExpression
what to do in every iteration