diff --git a/src/main/wacc/parser.scala b/src/main/wacc/parser.scala index 86eced7..9cec896 100644 --- a/src/main/wacc/parser.scala +++ b/src/main/wacc/parser.scala @@ -18,9 +18,9 @@ object parser { import lexer.{ident, integer, charLit, stringLit, negateCheck, errTokens} import ast._ - //error extensions + // error extensions extension [A](p: Parsley[A]) { - //combines label and explain together into one function call + // combines label and explain together into one function call def labelAndExplain(label: String, explanation: String): Parsley[A] = { p.label(label).explain(explanation) } @@ -28,9 +28,10 @@ object parser { t match { case LabelType.Expr => labelWithType(t).explain( - "a valid expression can start with: null, literals, identifiers, unary operators, or parentheses. " + - "Expressions can also contain array indexing and binary operators. " + - "Pair extraction is not allowed in expressions, only in assignments.") + "a valid expression can start with: null, literals, identifiers, unary operators, or parentheses. " + + "Expressions can also contain array indexing and binary operators. " + + "Pair extraction is not allowed in expressions, only in assignments." + ) case _ => labelWithType(t) } }