merge new changes from master into semantic errors #10

Merged
al4423 merged 19 commits from master into semantic-error-messages 2025-02-06 23:39:05 +00:00
7 changed files with 147 additions and 459 deletions
Showing only changes of commit 4e50ed35ba - Show all commits

View File

@@ -119,9 +119,13 @@ object ast {
case class Print(expr: Expr, newline: Boolean) extends Stmt
object Print extends ParserBridge2[Expr, Boolean, Print]
case class If(cond: Expr, thenStmt: NonEmptyList[Stmt], elseStmt: NonEmptyList[Stmt]) extends Stmt
object If extends ParserBridge3[Expr, NonEmptyList[Stmt], NonEmptyList[Stmt], If]
object If extends ParserBridge3[Expr, NonEmptyList[Stmt], NonEmptyList[Stmt], If] {
override def labels = List("if statement")
}
case class While(cond: Expr, body: NonEmptyList[Stmt]) extends Stmt
object While extends ParserBridge2[Expr, NonEmptyList[Stmt], While]
object While extends ParserBridge2[Expr, NonEmptyList[Stmt], While] {
override def labels = List("while statement")
}
case class Block(stmt: NonEmptyList[Stmt]) extends Stmt
object Block extends ParserBridge1[NonEmptyList[Stmt], Block]