diff --git a/.scalafmt.conf b/.scalafmt.conf index 22c361b..c8ba10c 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -2,3 +2,4 @@ version = 3.8.6 runner.dialect = scala3 binPack.literalsExclude = [] +maxColumn = 100 diff --git a/src/main/wacc/lexer.scala b/src/main/wacc/lexer.scala index abe5cb1..4351294 100644 --- a/src/main/wacc/lexer.scala +++ b/src/main/wacc/lexer.scala @@ -12,22 +12,19 @@ object lexer { ), symbolDesc = SymbolDesc.plain.copy( hardKeywords = Set( - "begin", "end", "is", "skip", "if", "then", "else", "fi", "while", "do", - "done", "read", "free", "return", "exit", "print", "println", "true", - "false", "int", "bool", "char", "string", "pair", "newpair", "fst", - "snd", "call", "chr", "ord", "len", "null" + "begin", "end", "is", "skip", "if", "then", "else", "fi", "while", "do", "done", "read", + "free", "return", "exit", "print", "println", "true", "false", "int", "bool", "char", + "string", "pair", "newpair", "fst", "snd", "call", "chr", "ord", "len", "null" ), hardOperators = Set( - "+", "-", "*", "/", "%", ">", "<", ">=", "<=", "==", "!=", "&&", "||", - "!" + "+", "-", "*", "/", "%", ">", "<", ">=", "<=", "==", "!=", "&&", "||", "!" ) ), spaceDesc = SpaceDesc.plain.copy( lineCommentStart = "#" ), textDesc = TextDesc.plain.copy( - graphicCharacter = - Basic(c => c >= ' ' && c != '\\' && c != '\'' && c != '"'), + graphicCharacter = Basic(c => c >= ' ' && c != '\\' && c != '\'' && c != '"'), escapeSequences = EscapeDesc.plain.copy( literals = Set('\\', '"', '\''), mapping = Map( diff --git a/src/test/wacc/examples.scala b/src/test/wacc/examples.scala index cb4db0e..65aa54b 100644 --- a/src/test/wacc/examples.scala +++ b/src/test/wacc/examples.scala @@ -5,10 +5,7 @@ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.Inspectors.forEvery import parsley.{Success, Failure} -class ParallelExamplesSpec - extends AnyFlatSpec - with BeforeAndAfterAll - with ParallelTestExecution { +class ParallelExamplesSpec extends AnyFlatSpec with BeforeAndAfterAll with ParallelTestExecution { val files = allWaccFiles("wacc-examples/valid").map { p => (p.toString, List(0))