Merge branch 'master' into lexer

This commit is contained in:
Gleb Koval 2025-02-01 20:48:49 +00:00
commit 993acddad3
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
3 changed files with 7 additions and 12 deletions

View File

@ -2,3 +2,4 @@ version = 3.8.6
runner.dialect = scala3
binPack.literalsExclude = []
maxColumn = 100

View File

@ -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(

View File

@ -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))