From 8b64f2e352e362afd283208c3394cfdb70b62885 Mon Sep 17 00:00:00 2001 From: Barf-Vader <47476490+Barf-Vader@users.noreply.github.com> Date: Thu, 6 Feb 2025 17:41:58 +0000 Subject: [PATCH] fix: removed redundant labelling in ast Co-authored-by: gc1523 --- src/main/wacc/ast.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/wacc/ast.scala b/src/main/wacc/ast.scala index 7e84b14..c6e743e 100644 --- a/src/main/wacc/ast.scala +++ b/src/main/wacc/ast.scala @@ -119,13 +119,9 @@ 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] { - override def labels = List("if statement") - } + object If extends ParserBridge3[Expr, NonEmptyList[Stmt], NonEmptyList[Stmt], If] case class While(cond: Expr, body: NonEmptyList[Stmt]) extends Stmt - object While extends ParserBridge2[Expr, NonEmptyList[Stmt], While] { - override def labels = List("while statement") - } + object While extends ParserBridge2[Expr, NonEmptyList[Stmt], While] case class Block(stmt: NonEmptyList[Stmt]) extends Stmt object Block extends ParserBridge1[NonEmptyList[Stmt], Block]