From 8637cafcaaa657e1fcfb3532f47dd6386f01bdf7 Mon Sep 17 00:00:00 2001 From: Agustin Mendez Date: Sun, 29 Dec 2019 14:33:28 -0300 Subject: [PATCH 1/4] error reporting working --- Makefile | 3 + src/compiler/context.lys | 130 ++++- src/compiler/messagecollector.lys | 42 ++ src/compiler/nodes.lys | 46 +- src/compiler/phases/cannonical.lys | 15 +- src/compiler/system.lys | 29 + src/index.ts | 36 +- src/main.lys | 9 + src/stringbuilder.lys | 9 +- test/fbt.ts | 5 +- .../canonical/effects.lys.syntax-error | 183 +++++++ .../canonical/embededWast.lys.syntax-error | 433 +++++++++++++++ .../fixtures/parser-error/a.lys.syntax-error | 1 + .../fixtures/parser-error/b.lys.syntax-error | 9 + .../fixtures/parser-error/c.lys.syntax-error | 1 + .../fixtures/parser-error/d.lys.syntax-error | 9 + .../fixtures/parser-error/e.lys.syntax-error | 1 + .../fixtures/parser-error/f.lys.syntax-error | 1 + .../fixtures/parser-error/h.lys.syntax-error | 2 + .../fixtures/parser-error/i.lys.syntax-error | 1 + .../fixtures/parser-error/j.lys.syntax-error | 3 + .../fixtures/parser-error/k.lys.syntax-error | 5 + .../fixtures/parser-error/l.lys.syntax-error | 4 + .../fixtures/parser-error/o.lys.syntax-error | 2 + .../sugar/enum-temperature.lys.syntax-error | 6 + .../sugar/enum-unary.lys.syntax-error | 517 ++++++++++++++++++ .../expectedtype.lys.syntax-error | 32 ++ .../syntaxerrors/missingtype.lys.syntax-error | 1 + .../syntaxerrors/var.lys.syntax-error | 12 + .../syntaxerrors/wasm.lys.syntax-error | 4 + test/helpers.lys | 101 ++++ test/parser.spec.ts | 14 +- test/test.lys | 2 + 33 files changed, 1605 insertions(+), 63 deletions(-) create mode 100644 src/compiler/messagecollector.lys create mode 100644 src/compiler/system.lys create mode 100644 test/fixtures/fixtures/canonical/effects.lys.syntax-error create mode 100644 test/fixtures/fixtures/canonical/embededWast.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/a.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/b.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/c.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/d.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/e.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/f.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/h.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/i.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/j.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/k.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/l.lys.syntax-error create mode 100644 test/fixtures/fixtures/parser-error/o.lys.syntax-error create mode 100644 test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error create mode 100644 test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error create mode 100644 test/fixtures/syntaxerrors/expectedtype.lys.syntax-error create mode 100644 test/fixtures/syntaxerrors/missingtype.lys.syntax-error create mode 100644 test/fixtures/syntaxerrors/var.lys.syntax-error create mode 100644 test/fixtures/syntaxerrors/wasm.lys.syntax-error create mode 100644 test/helpers.lys diff --git a/Makefile b/Makefile index c8ed341..4b6e841 100755 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ only-test: @cd src; ../node_modules/.bin/ncc build index.ts -o ../dist @./node_modules/.bin/mocha -r ts-node/register test/\*\*/\*.spec.ts +watch-tests: + ./node_modules/.bin/lys test/test.lys --test --wast --lib node_modules/lys/dist/utils/libs/env.js --desugar --watch + only-snapshot: export UPDATE_AST=true only-snapshot: only-test diff --git a/src/compiler/context.lys b/src/compiler/context.lys index 7a34f7f..56061d8 100644 --- a/src/compiler/context.lys +++ b/src/compiler/context.lys @@ -1 +1,129 @@ -struct CompilerContext() \ No newline at end of file +import src::compiler::messagecollector +import src::compiler::nodes +import src::parser::parser +import src::helpers +import src::stringbuilder + +enum ModuleMap { + EmptyModule + Module( + moduleName: string, + path: string, + source: string, + document: CodeNode, + phase: i32, + errors: i32 + ) + ModuleCons(head: Module, tail: ModuleMap) +} + +struct CompilerContext( + messageCollector: MessageCollector, + modules: ModuleMap +) + +impl ModuleMap { + #[method] + fun findModule(self: ModuleMap, moduleNameToFind: string): Module | EmptyModule = { + match self { + case x is EmptyModule -> x + case x is Module(moduleName) -> if (moduleName == moduleNameToFind) x else EmptyModule + case is ModuleCons(head, tail) -> + if (head.moduleName == moduleNameToFind) + head + else + tail.findModule(moduleNameToFind) + } + } +} + +impl CompilerContext { + fun apply(): CompilerContext = CompilerContext(MessageCollector(), EmptyModule) + + #[method] + fun getModuleByContent(self: CompilerContext, path: string, moduleName: string, source: string): Module = { + val ast = parse(source, "Document", src::parser::lysgrammar::getGrammar()) + + val module = match ast { + case is Nil -> { + self.messageCollector.append("Error parsing file: " ++ path, SourcePosition(path, 0x0, 0x1)) + Module(moduleName, path, source, EmptyNode, 0, 1) + } + case ast is AstNode -> { + val errors = collectErrors(ast, self.messageCollector, path) + val code = src::compiler::phases::cannonical::processNode(ast) + Module(moduleName, path, source, code, 0, errors) + } + } + + match self.modules { + case is EmptyModule -> self.modules = module + else -> self.modules = ModuleCons(module, self.modules) + } + + module + } + + #[method] + fun findModule(self: CompilerContext, moduleName: string): Module | EmptyModule = + self.modules.findModule(moduleName) + + fun printErrors(head: Message, sb: StringBuilder, fileName: string, counter: i32): i32 = match head { + case is PositionCapableMessage(message, position) -> { + if (position.moduleName == fileName) { + sb.append(string.stringify(counter + 1)) + .append(") ") + .append(message) + .append(" at ") + .append(position.moduleName) + .append("\n") + + counter + 1 + } else { + counter + } + } + case is MessageCons(head, tail) -> { + // Print the first error, return the current number + val newNumber = printErrors(head, sb, fileName, counter) + // Print the rest of the errors + printErrors(tail, sb, fileName, newNumber) + } + else -> counter + } + + #[method] + fun printErrors(self: CompilerContext, sb: StringBuilder): i32 = { + var errors = 0 + var current = self.modules + + loop { + match current { + case is ModuleCons(head, tail) -> { + val nsb = StringBuilder() + errors = printErrors(self.messageCollector.headMessage, nsb, head.path, errors) + + if (!nsb.isEmpty()) { + sb.append(head.path).append("\n").append(nsb.toString()) + } + + current = tail + continue + } + case head is Module -> { + val nsb = StringBuilder() + errors = printErrors(self.messageCollector.headMessage, sb, head.path, errors) + + if (!nsb.isEmpty()) { + sb.append(head.path).append("\n").append(nsb.toString()) + } + + break + } + case is EmptyModule -> break + } + } + + errors + } +} \ No newline at end of file diff --git a/src/compiler/messagecollector.lys b/src/compiler/messagecollector.lys new file mode 100644 index 0000000..02f2918 --- /dev/null +++ b/src/compiler/messagecollector.lys @@ -0,0 +1,42 @@ +import src::stringbuilder +import src::parser::parser + +struct SourcePosition(moduleName: string, start: u32, end: u32) + +enum Message { + HeadMessage + PositionCapableMessage(message: string, position: SourcePosition) + MessageCons(head: Message, tail: Message) +} + +struct MessageCollector(headMessage: Message) + +impl MessageCollector { + fun apply(): MessageCollector = MessageCollector(HeadMessage) + + #[method] + fun append(self: MessageCollector, message: string, position: SourcePosition): void = { + self.append(PositionCapableMessage(message, position)) + } + + #[method] + fun append(self: MessageCollector, message: PositionCapableMessage): void = + match self.headMessage { + case is HeadMessage -> self.headMessage = message + else -> self.headMessage = MessageCons(message, self.headMessage) + } +} + +fun collectErrors(node: AstNode, messageCollector: MessageCollector, moduleName: string): i32 = match node { + case is SyntaxError(token, message) -> { + messageCollector.append(message, SourcePosition(moduleName, token.start, token.end)) + 1 + } + case is UnexpectedToken(token, value) -> { + messageCollector.append("Unexpected token \"" ++ value ++ "\"", SourcePosition(moduleName, token.start, token.end)) + 1 + } + case is Node(name, child) -> collectErrors(child, messageCollector, moduleName) + case is AstCons(head, tail) -> collectErrors(head, messageCollector, moduleName) + collectErrors(tail, messageCollector, moduleName) + else -> 0 +} \ No newline at end of file diff --git a/src/compiler/nodes.lys b/src/compiler/nodes.lys index fac3caa..143df35 100644 --- a/src/compiler/nodes.lys +++ b/src/compiler/nodes.lys @@ -3,7 +3,7 @@ import src::stringbuilder enum CodeNode { EmptyNode() - ErrorNode() + ErrorNode(astNode: AstNode) CodeNodeCons(head: CodeNode, tail: CodeNode) Document(astNode: AstNode, headDirective: CodeNode) @@ -472,7 +472,6 @@ impl CodeNode { .append("|-") .append(CodeNode.nodeName(self)) - // support::env::printf(ind ++ CodeNode.nodeName(self)) match self { case is NameIdentifierNode(astNode, name) -> sb.append(" name=").append(name) @@ -499,11 +498,9 @@ impl CodeNode { printAst(tail, sb, indentation) } case is Document(astNode, headDirective) -> { - // support::env::printf("> Document") printAst(headDirective, sb, indentation + 1) } case is FunctionTypeNode(astNode, parameters, returnType, effect) -> { - // support::env::printf("> FunctionTypeNode") printAst(parameters, sb, indentation + 1) printAst(returnType, sb, indentation + 1) printAst(effect, sb, indentation + 1) @@ -512,30 +509,24 @@ impl CodeNode { printAst(names, sb, indentation + 1) } case is ReferenceNode(astNode, variable) -> { - // support::env::printf("> ReferenceNode") printAst(variable, sb, indentation + 1) } case is BlockNode(astNode, headStatement) -> { - // support::env::printf("> BlockNode") printAst(headStatement, sb, indentation + 1) } case is MemberNode(astNode, lhs, operator, rhs) -> { - // support::env::printf("> MemberNode") printAst(lhs, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is DecoratorNode(astNode, decoratorName, headArgument) -> { - // support::env::printf("> DecoratorNode") printAst(decoratorName, sb, indentation + 1) printAst(headArgument, sb, indentation + 1) } case is ParameterNode(astNode, parameterName, parameterType) -> { - // support::env::printf("> ParameterNode") printAst(parameterName, sb, indentation + 1) printAst(parameterType, sb, indentation + 1) } case is FunctionNode(astNode, functionName, headParameter, returnType, body) -> { - // support::env::printf("> FunctionNode") printAst(functionName, sb, indentation + 1) printAst(headParameter, sb, indentation + 1) printAst(returnType, sb, indentation + 1) @@ -549,178 +540,143 @@ impl CodeNode { printAst(headNames, sb, indentation + 1) } case is VarDeclarationNode(astNode, isMutable, name, typeDecl, value) -> { - // support::env::printf("> VarDeclarationNode") printAst(name, sb, indentation + 1) printAst(typeDecl, sb, indentation + 1) printAst(value, sb, indentation + 1) } case is AssignmentNode(astNode, lhs, rhs) -> { - // support::env::printf("> AssignmentNode") printAst(lhs, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is ImplDirectiveNode(astNode, baseImpl, targetImpl, headDirective) -> { - // support::env::printf("> ImplDirectiveNode") printAst(baseImpl, sb, indentation + 1) printAst(targetImpl, sb, indentation + 1) printAst(headDirective, sb, indentation + 1) } case is ImportDirectiveNode(astNode, module, alias) -> { - // support::env::printf("> ImportDirectiveNode") printAst(module, sb, indentation + 1) printAst(alias, sb, indentation + 1) } case is StructDirectiveNode(astNode, decl) -> { - // support::env::printf("> StructDirectiveNode") printAst(decl, sb, indentation + 1) } case is FunDirectiveNode(astNode, headDecorator, function) -> { - // support::env::printf("> FunDirectiveNode") printAst(headDecorator, sb, indentation + 1) printAst(function, sb, indentation + 1) } case is EffectDirectiveNode(astNode, effectDecl) -> { - // support::env::printf("> EffectDirectiveNode") printAst(effectDecl, sb, indentation + 1) } case is OverloadedFunDirectiveNode(astNode, functionName, headFun) -> { - // support::env::printf("> OverloadedFunDirectiveNode") printAst(functionName, sb, indentation + 1) printAst(headFun, sb, indentation + 1) } case is VarDirectiveNode(astNode, decl) -> { - // support::env::printf("> VarDirectiveNode") printAst(decl, sb, indentation + 1) } case is TypeDirectiveNode(astNode, name, declType) -> { - // support::env::printf("> TypeDirectiveNode") printAst(name, sb, indentation + 1) printAst(declType, sb, indentation + 1) } case is TraitDirectiveNode(astNode, name, headDirective) -> { - // support::env::printf("> TraitDirectiveNode") printAst(name, sb, indentation + 1) printAst(headDirective, sb, indentation + 1) } case is EnumDirectiveNode(astNode, name, headDeclaration) -> { - // support::env::printf("> EnumDirectiveNode") printAst(name, sb, indentation + 1) printAst(headDeclaration, sb, indentation + 1) } case is StackTypeNode(astNode, headMeta) -> { - // support::env::printf("> StackTypeNode") printAst(headMeta, sb, indentation + 1) } case is StructTypeNode(astNode, headParameter) -> { - // support::env::printf("> StructTypeNode") printAst(headParameter, sb, indentation + 1) } case is AbstractFunctionCallNode(astNode, headArgument, resolvedFunction) -> { - // support::env::printf("> AbstractFunctionCallNode") printAst(headArgument, sb, indentation + 1) } case is InjectedFunctionCallNode(astNode, headArgument, resolvedFunction) -> { - // support::env::printf("> InjectedFunctionCallNode") printAst(headArgument, sb, indentation + 1) } case is FunctionCallNode(astNode, functionNode, headArgument, resolvedFunction) -> { - // support::env::printf("> FunctionCallNode") printAst(functionNode, sb, indentation + 1) printAst(headArgument, sb, indentation + 1) } case is ParenExpressionNode(astNode, expression) -> { - // support::env::printf("> ParenExpressionNode") printAst(expression, sb, indentation + 1) } case is BinaryExpressionNode(astNode, lhs, operator, rhs) -> { - // support::env::printf("> BinaryExpressionNode") printAst(lhs, sb, indentation + 1) printAst(operator, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is AsExpressionNode(astNode, lhs, rhs) -> { - // support::env::printf("> AsExpressionNode") printAst(lhs, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is IsExpressionNode(astNode, lhs, rhs) -> { - // support::env::printf("> IsExpressionNode") printAst(lhs, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is UnaryExpressionNode(astNode, operator, rhs) -> { - // support::env::printf("> UnaryExpressionNode") printAst(operator, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is WasmAtomNode(astNode, symbol, headArgument) -> { - // support::env::printf("> WasmAtomNode") printAst(headArgument, sb, indentation + 1) } case is WasmExpressionNode(astNode, headAtom) -> { - // support::env::printf("> WasmExpressionNode") printAst(headAtom, sb, indentation + 1) } case is IfNode(astNode, condition, truePart, falsePart) -> { - // support::env::printf("> IfNode") printAst(condition, sb, indentation + 1) printAst(truePart, sb, indentation + 1) printAst(falsePart, sb, indentation + 1) } case is UnionTypeNode(astNode, lhs, rhs) -> { - // support::env::printf("> UnionTypeNode") printAst(lhs, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is IntersectionTypeNode(astNode, lhs, rhs) -> { - // support::env::printf("> IntersectionTypeNode") printAst(lhs, sb, indentation + 1) printAst(rhs, sb, indentation + 1) } case is StructDeclarationNode(astNode, name, headParameter) -> { - // support::env::printf("> StructDeclarationNode") printAst(name, sb, indentation + 1) printAst(headParameter, sb, indentation + 1) } case is EffectDeclarationNode(astNode, name) -> { - // support::env::printf("> EffectDeclarationNode") printAst(name, sb, indentation + 1) } case is PatternMatcherNode(astNode, lhs, headMatcher) -> { - // support::env::printf("> PatternMatcherNode") printAst(lhs, sb, indentation + 1) printAst(headMatcher, sb, indentation + 1) } case is MatchConditionNode(astNode, declaredName, condition, body) -> { - // support::env::printf("> MatchConditionNode") printAst(declaredName, sb, indentation + 1) printAst(condition, sb, indentation + 1) printAst(body, sb, indentation + 1) } case is MatchCaseIsNode(astNode, declaredName, typeReference, headDeconstruct, body) -> { - // support::env::printf("> MatchCaseIsNode") printAst(declaredName, sb, indentation + 1) printAst(typeReference, sb, indentation + 1) printAst(headDeconstruct, sb, indentation + 1) printAst(body, sb, indentation + 1) } case is MatchLiteralNode(astNode, literal, body) -> { - // support::env::printf("> MatchLiteralNode") printAst(literal, sb, indentation + 1) printAst(body, sb, indentation + 1) } case is MatchDefaultNode(astNode, declaredName, body) -> { - // support::env::printf("> MatchDefaultNode") printAst(declaredName, sb, indentation + 1) printAst(body, sb, indentation + 1) } case is LoopNode(astNode, expression) -> { - // support::env::printf("> LoopNode") printAst(expression, sb, indentation + 1) } else -> { /* noop */ } diff --git a/src/compiler/phases/cannonical.lys b/src/compiler/phases/cannonical.lys index 83eb812..3014eff 100644 --- a/src/compiler/phases/cannonical.lys +++ b/src/compiler/phases/cannonical.lys @@ -25,30 +25,30 @@ fun nameOrEmpty(astNode: AstNode): NameIdentifierNode | EmptyNode = fun nameOrError(astNode: AstNode): NameIdentifierNode | ErrorNode = match processNode(astNode) { case name is NameIdentifierNode -> name - else -> ErrorNode + else -> ErrorNode(astNode) } fun structOrError(astNode: AstNode): StructDeclarationNode | ErrorNode = match processNode(astNode) { case name is StructDeclarationNode -> name - else -> ErrorNode + else -> ErrorNode(astNode) } fun referenceOrError(astNode: AstNode): ReferenceNode | ErrorNode = match processNode(astNode) { case name is ReferenceNode -> name - else -> ErrorNode + else -> ErrorNode(astNode) } fun funOrError(astNode: AstNode): FunctionNode | ErrorNode = match processNode(astNode) { case name is FunctionNode -> name - else -> ErrorNode + else -> ErrorNode(astNode) } fun fqnOrEmpty(astNode: AstNode): QNameNode | ErrorNode = match processNode(astNode) { case name is QNameNode -> name - else -> ErrorNode + else -> ErrorNode(astNode) } fun textOf(astNode: AstNode): string = match astNode { @@ -189,7 +189,6 @@ fun processNode(astNode: AstNode): CodeNode = match astNode { case "StructDeclaration" -> StructDeclarationNode(astNode, nameOrError(first(child)), processNode(rest(child))) case "BooleanLiteral" -> processNode(child) case "ParenExpression" -> processNode(child) - case "AsExpression" -> AsExpressionNode(astNode, processNode(first(child)), processNode(rest(child))) case "CaseCondition" -> { var resto = child val name = nameOrEmpty(first(resto)) @@ -221,8 +220,6 @@ fun processNode(astNode: AstNode): CodeNode = match astNode { MatchDefaultNode(astNode, name, body) } case "AsExpression" -> AsExpressionNode(astNode, processNode(first(child)), processNode(rest(child))) - case "AsExpression" -> AsExpressionNode(astNode, processNode(first(child)), processNode(rest(child))) - case "AsExpression" -> AsExpressionNode(astNode, processNode(first(child)), processNode(rest(child))) case "IsExpression" -> IsExpressionNode(astNode, processNode(first(child)), processNode(rest(child))) case "BinaryOpExpression" -> { val r = rest(child) @@ -290,7 +287,7 @@ fun processNode(astNode: AstNode): CodeNode = match astNode { } else -> { support::env::printf("No handler for " ++ name) - ErrorNode + ErrorNode(astNode) } } } diff --git a/src/compiler/system.lys b/src/compiler/system.lys new file mode 100644 index 0000000..fdc249a --- /dev/null +++ b/src/compiler/system.lys @@ -0,0 +1,29 @@ +// args: string[] +// newLine: string +// useCaseSensitiveFileNames: boolean +// write(s: string): void +// writeOutputIsTTY?(): boolean +// readFile(path: string, encoding?: string): string | void +// getFileSize?(path: string): number +// writeFile(path: string, data: string, writeByteOrderMark?: boolean): void +// resolvePath(...path: string[]): string +// fileExists(path: string): boolean +// directoryExists(path: string): boolean +// createDirectory(path: string): void +// getCurrentDirectory(): string +// getDirectories?(path: string): string[] +// relative(from: string, to: string): string + +fun newLine(): boolean = "\n" +fun useCaseSensitiveFileNames(): boolean = true +fun write(str: string): void = {} +fun writeOutputIsTTY(): boolean = true +fun readFile(path: string): bytes = bytes(0) +fun getFileSize(path: string): u32 = 0x0 +fun writeFile(path: string, data: bytes, writeByteOrderMark: boolean): boolean = false +fun resolve(from: string, to: string): string = from ++ to +fun fileExists(path: string): boolean = false +fun directoryExists(path: string): boolean = false +fun createDirectory(path: string): boolean = false +fun getCurrentDirectory(): string = "/" +fun relative(from: string, to: string): string = from ++ to \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index ba27f50..41603fa 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,9 @@ declare var require: any; const wasmModule = require("../build/main"); -import { readStringFromHeap, writeStringToHeap } from "lys/dist/utils/execution"; +import { + readStringFromHeap, + writeStringToHeap +} from "lys/dist/utils/execution"; export async function tokenizer() { const instance = await wasmModule.default(); @@ -10,15 +13,39 @@ export async function tokenizer() { } function parseAst(source: string): string { - return readStringFromHeap(instance, instance.exports.parseAst(writeStringToHeap(instance, source))); + return readStringFromHeap( + instance, + instance.exports.parseAst(writeStringToHeap(instance, source)) + ); } function parseAndEmit(source: string): string { - return readStringFromHeap(instance, instance.exports.parseAndEmit(writeStringToHeap(instance, source))); + return readStringFromHeap( + instance, + instance.exports.parseAndEmit(writeStringToHeap(instance, source)) + ); } function parseAndEmitAst(source: string): string { - return readStringFromHeap(instance, instance.exports.parseAndEmitAst(writeStringToHeap(instance, source))); + return readStringFromHeap( + instance, + instance.exports.parseAndEmitAst(writeStringToHeap(instance, source)) + ); + } + + function parseAndEmitErrors( + moduleName: string, + path: string, + source: string + ): string { + return readStringFromHeap( + instance, + instance.exports.parseAndEmitErrors( + writeStringToHeap(instance, moduleName), + writeStringToHeap(instance, path), + writeStringToHeap(instance, source) + ) + ); } function startLexer(data: string) { @@ -29,6 +56,7 @@ export async function tokenizer() { startLexer, parseAndEmit, parseAndEmitAst, + parseAndEmitErrors, parseAst, eat }; diff --git a/src/main.lys b/src/main.lys index 5070e37..32463ca 100644 --- a/src/main.lys +++ b/src/main.lys @@ -45,3 +45,12 @@ fun parseAndEmitAst(strAddress: UnsafeCPointer): UnsafeCPointer = { else -> "" as UnsafeCPointer } } + +#[export "parseAndEmitErrors"] +fun parseAndEmitErrors(moduleName: UnsafeCPointer, path: UnsafeCPointer, strAddress: UnsafeCPointer): UnsafeCPointer = { + val ctx = src::compiler::context::CompilerContext() + val sb = StringBuilder() + ctx.getModuleByContent(UCS2.fromPtr(path), UCS2.fromPtr(moduleName), UCS2.fromPtr(strAddress)) + ctx.printErrors(sb) + sb.toString() as UnsafeCPointer +} diff --git a/src/stringbuilder.lys b/src/stringbuilder.lys index 9009508..93a8cf3 100644 --- a/src/stringbuilder.lys +++ b/src/stringbuilder.lys @@ -12,10 +12,17 @@ impl StringBuilder { #[method] fun append(self: StringBuilder, str: string): StringBuilder = { - self.mutableHead = StringBuilderCons(str, self.mutableHead) + if (str.length > 0x0) { + self.mutableHead = StringBuilderCons(str, self.mutableHead) + } self } + #[method] + fun isEmpty(self: StringBuilder): boolean = + self.mutableHead is StringBuilderEmpty + + // Calculates the length of the string to build private fun calculateLength(self: StringBuilderLinkedList): u32 = { var current = self diff --git a/test/fbt.ts b/test/fbt.ts index 180cc3a..a9e35ae 100644 --- a/test/fbt.ts +++ b/test/fbt.ts @@ -1,17 +1,18 @@ import { readFileSync, existsSync, writeFileSync } from "fs"; import * as expect from "expect"; import * as glob from "glob"; +import { relative } from "path"; export const WRITE_TO_FILE = process.env.UPDATE_AST; -export function folderBasedTest(grep: string, fn: (source: string) => Promise, extension: string) { +export function folderBasedTest(grep: string, fn: (source: string, filename: string) => Promise, extension: string) { function testFile(fileName: string) { it(fileName, async () => { const content = readFileSync(fileName).toString(); - const result = await fn(content) + const result = await fn(content, relative(process.cwd(), fileName)) if (result !== null) { const compareToFileName = fileName + extension; diff --git a/test/fixtures/fixtures/canonical/effects.lys.syntax-error b/test/fixtures/fixtures/canonical/effects.lys.syntax-error new file mode 100644 index 0000000..936f4bc --- /dev/null +++ b/test/fixtures/fixtures/canonical/effects.lys.syntax-error @@ -0,0 +1,183 @@ +1) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys +2) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +3) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys +4) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +5) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +6) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys +7) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +8) Unexpected token `/` at test/fixtures/fixtures/canonical/effects.lys +9) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +10) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys +11) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +12) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +13) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys +14) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +15) Unexpected token `else` at test/fixtures/fixtures/canonical/effects.lys +16) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +17) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys +18) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +19) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +20) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +21) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +22) Unexpected token `raise` at test/fixtures/fixtures/canonical/effects.lys +23) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +24) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +25) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys +26) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +27) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +28) Unexpected token `0` at test/fixtures/fixtures/canonical/effects.lys +29) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +30) Unexpected token `==` at test/fixtures/fixtures/canonical/effects.lys +31) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +32) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys +33) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +34) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +35) Unexpected token `if` at test/fixtures/fixtures/canonical/effects.lys +36) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +37) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +38) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys +39) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +40) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys +41) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +42) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys +43) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +44) Unexpected token `>` at test/fixtures/fixtures/canonical/effects.lys +45) Unexpected token `_` at test/fixtures/fixtures/canonical/effects.lys +46) Unexpected token `<` at test/fixtures/fixtures/canonical/effects.lys +47) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +48) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +49) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +50) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys +51) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +52) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +53) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys +54) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +55) Unexpected token `,` at test/fixtures/fixtures/canonical/effects.lys +56) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys +57) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +58) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +59) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys +60) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +61) Unexpected token `zeroDiv` at test/fixtures/fixtures/canonical/effects.lys +62) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +63) Unexpected token `fun` at test/fixtures/fixtures/canonical/effects.lys +64) Unexpected token ` + +` at test/fixtures/fixtures/canonical/effects.lys +65) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys +66) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +67) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys +68) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +69) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +70) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys +71) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +72) Unexpected token `/` at test/fixtures/fixtures/canonical/effects.lys +73) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +74) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys +75) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +76) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +77) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys +78) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +79) Unexpected token `else` at test/fixtures/fixtures/canonical/effects.lys +80) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +81) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys +82) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +83) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +84) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +85) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +86) Unexpected token `raise` at test/fixtures/fixtures/canonical/effects.lys +87) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +88) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +89) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys +90) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +91) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +92) Unexpected token `0` at test/fixtures/fixtures/canonical/effects.lys +93) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +94) Unexpected token `==` at test/fixtures/fixtures/canonical/effects.lys +95) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +96) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys +97) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +98) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +99) Unexpected token `if` at test/fixtures/fixtures/canonical/effects.lys +100) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +101) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +102) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys +103) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +104) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys +105) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +106) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys +107) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +108) Unexpected token `>` at test/fixtures/fixtures/canonical/effects.lys +109) Unexpected token `_` at test/fixtures/fixtures/canonical/effects.lys +110) Unexpected token `|` at test/fixtures/fixtures/canonical/effects.lys +111) Unexpected token `exn` at test/fixtures/fixtures/canonical/effects.lys +112) Unexpected token `<` at test/fixtures/fixtures/canonical/effects.lys +113) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +114) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +115) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +116) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys +117) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +118) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +119) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys +120) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +121) Unexpected token `,` at test/fixtures/fixtures/canonical/effects.lys +122) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys +123) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +124) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +125) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys +126) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +127) Unexpected token `>` at test/fixtures/fixtures/canonical/effects.lys +128) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys +129) Unexpected token `<` at test/fixtures/fixtures/canonical/effects.lys +130) Unexpected token `safeDiv` at test/fixtures/fixtures/canonical/effects.lys +131) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +132) Unexpected token `fun` at test/fixtures/fixtures/canonical/effects.lys +133) Unexpected token ` + +` at test/fixtures/fixtures/canonical/effects.lys +134) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys +135) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +136) Unexpected token `*` at test/fixtures/fixtures/canonical/effects.lys +137) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +138) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys +139) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +140) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys +141) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +142) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys +143) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +144) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +145) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys +146) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys +147) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +148) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys +149) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys +150) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys +151) Unexpected token `sqr` at test/fixtures/fixtures/canonical/effects.lys +152) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +153) Unexpected token `fun` at test/fixtures/fixtures/canonical/effects.lys +154) Unexpected token ` +` at test/fixtures/fixtures/canonical/effects.lys +155) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys +156) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +157) Unexpected token `*` at test/fixtures/fixtures/canonical/effects.lys +158) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +159) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys +160) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +161) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys +162) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +163) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys +164) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys +165) Unexpected token `<>` at test/fixtures/fixtures/canonical/effects.lys +166) A type or effect was expected at test/fixtures/fixtures/canonical/effects.lys diff --git a/test/fixtures/fixtures/canonical/embededWast.lys.syntax-error b/test/fixtures/fixtures/canonical/embededWast.lys.syntax-error new file mode 100644 index 0000000..9566714 --- /dev/null +++ b/test/fixtures/fixtures/canonical/embededWast.lys.syntax-error @@ -0,0 +1,433 @@ +1) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +2) Unexpected token `}` at test/fixtures/fixtures/canonical/embededWast.lys +3) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +4) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +5) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +6) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +7) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +8) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys +9) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +10) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +11) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +12) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +13) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +14) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +15) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +16) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +17) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +18) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +19) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +20) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +21) Unexpected token `1` at test/fixtures/fixtures/canonical/embededWast.lys +22) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +23) Unexpected token `const` at test/fixtures/fixtures/canonical/embededWast.lys +24) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +25) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +26) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +27) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +28) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +29) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +30) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +31) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +32) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +33) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys +34) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +35) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +36) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +37) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +38) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +39) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +40) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys +41) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +42) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +43) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +44) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +45) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +46) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys +47) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +48) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +49) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +50) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +51) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +52) Unexpected token `sub` at test/fixtures/fixtures/canonical/embededWast.lys +53) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +54) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +55) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +56) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +57) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +58) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +59) Unexpected token `$b` at test/fixtures/fixtures/canonical/embededWast.lys +60) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +61) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +62) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +63) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +64) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +65) Unexpected token `string_copy` at test/fixtures/fixtures/canonical/embededWast.lys +66) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +67) Unexpected token `call` at test/fixtures/fixtures/canonical/embededWast.lys +68) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +69) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +70) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +71) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +72) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +73) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys +74) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +75) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +76) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +77) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +78) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +79) Unexpected token `$a` at test/fixtures/fixtures/canonical/embededWast.lys +80) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +81) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +82) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +83) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +84) Unexpected token `string_copy` at test/fixtures/fixtures/canonical/embededWast.lys +85) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +86) Unexpected token `call` at test/fixtures/fixtures/canonical/embededWast.lys +87) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +88) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +89) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +90) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +91) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +92) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +93) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +94) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys +95) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +96) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +97) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +98) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +99) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +100) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +101) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys +102) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +103) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +104) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +105) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +106) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +107) Unexpected token `store8` at test/fixtures/fixtures/canonical/embededWast.lys +108) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +109) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +110) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +111) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +112) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +113) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +114) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +115) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +116) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +117) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +118) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +119) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +120) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +121) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +122) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +123) Unexpected token `1` at test/fixtures/fixtures/canonical/embededWast.lys +124) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +125) Unexpected token `const` at test/fixtures/fixtures/canonical/embededWast.lys +126) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +127) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +128) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +129) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +130) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +131) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +132) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys +133) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +134) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +135) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +136) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +137) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +138) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys +139) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +140) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +141) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +142) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +143) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +144) Unexpected token `malloc` at test/fixtures/fixtures/canonical/embededWast.lys +145) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +146) Unexpected token `call` at test/fixtures/fixtures/canonical/embededWast.lys +147) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +148) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +149) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +150) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys +151) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +152) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys +153) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +154) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +155) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +156) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +157) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +158) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +159) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +160) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +161) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +162) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +163) Unexpected token `1` at test/fixtures/fixtures/canonical/embededWast.lys +164) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +165) Unexpected token `const` at test/fixtures/fixtures/canonical/embededWast.lys +166) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +167) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +168) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +169) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +170) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +171) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +172) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +173) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +174) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +175) Unexpected token `b` at test/fixtures/fixtures/canonical/embededWast.lys +176) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +177) Unexpected token `load8_u` at test/fixtures/fixtures/canonical/embededWast.lys +178) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +179) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +180) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +181) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +182) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +183) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +184) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys +185) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +186) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +187) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +188) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +189) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +190) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys +191) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +192) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +193) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +194) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +195) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +196) Unexpected token `sub` at test/fixtures/fixtures/canonical/embededWast.lys +197) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +198) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +199) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +200) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +201) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +202) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys +203) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +204) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys +205) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +206) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +207) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +208) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +209) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +210) Unexpected token `a` at test/fixtures/fixtures/canonical/embededWast.lys +211) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +212) Unexpected token `load8_u` at test/fixtures/fixtures/canonical/embededWast.lys +213) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +214) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +215) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +216) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +217) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys +218) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +219) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys +220) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +221) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +222) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +223) Unexpected token `return` at test/fixtures/fixtures/canonical/embededWast.lys +224) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +225) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +226) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +227) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +228) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +229) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +230) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys +231) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +232) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys +233) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +234) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +235) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +236) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +237) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +238) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +239) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys +240) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +241) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys +242) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +243) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +244) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +245) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +246) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +247) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +248) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys +249) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +250) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys +251) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +252) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +253) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +254) Unexpected token `{` at test/fixtures/fixtures/canonical/embededWast.lys +255) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +256) Unexpected token `wasm` at test/fixtures/fixtures/canonical/embededWast.lys +257) Unexpected token `%` at test/fixtures/fixtures/canonical/embededWast.lys +258) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +259) Unexpected token `=` at test/fixtures/fixtures/canonical/embededWast.lys +260) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +261) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +262) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +263) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys +264) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +265) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +266) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +267) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys +268) Unexpected token `b` at test/fixtures/fixtures/canonical/embededWast.lys +269) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +270) Unexpected token `,` at test/fixtures/fixtures/canonical/embededWast.lys +271) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +272) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +273) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys +274) Unexpected token `a` at test/fixtures/fixtures/canonical/embededWast.lys +275) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +276) Unexpected token `strAdd` at test/fixtures/fixtures/canonical/embededWast.lys +277) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +278) Unexpected token `fun` at test/fixtures/fixtures/canonical/embededWast.lys +279) Unexpected token ` + +` at test/fixtures/fixtures/canonical/embededWast.lys +280) Unexpected token `}` at test/fixtures/fixtures/canonical/embededWast.lys +281) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +282) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +283) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys +284) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +285) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +286) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +287) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +288) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +289) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +290) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +291) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +292) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +293) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +294) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +295) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +296) Unexpected token `$size` at test/fixtures/fixtures/canonical/embededWast.lys +297) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +298) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +299) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +300) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +301) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +302) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +303) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys +304) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +305) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys +306) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +307) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +308) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +309) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys +310) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys +311) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +312) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +313) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +314) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +315) Unexpected token `$freeblock` at test/fixtures/fixtures/canonical/embededWast.lys +316) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +317) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +318) Unexpected token `set_global` at test/fixtures/fixtures/canonical/embededWast.lys +319) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +320) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +321) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +322) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +323) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +324) Unexpected token `freeblock` at test/fixtures/fixtures/canonical/embededWast.lys +325) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +326) Unexpected token `get_global` at test/fixtures/fixtures/canonical/embededWast.lys +327) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +328) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +329) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys +330) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +331) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys +332) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +333) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +334) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +335) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +336) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +337) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +338) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys +339) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +340) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys +341) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +342) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +343) Unexpected token ` +` at test/fixtures/fixtures/canonical/embededWast.lys +344) Unexpected token `{` at test/fixtures/fixtures/canonical/embededWast.lys +345) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +346) Unexpected token `wasm` at test/fixtures/fixtures/canonical/embededWast.lys +347) Unexpected token `%` at test/fixtures/fixtures/canonical/embededWast.lys +348) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +349) Unexpected token `=` at test/fixtures/fixtures/canonical/embededWast.lys +350) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +351) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +352) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +353) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys +354) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys +355) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys +356) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +357) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys +358) Unexpected token `size` at test/fixtures/fixtures/canonical/embededWast.lys +359) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys +360) Unexpected token `malloc` at test/fixtures/fixtures/canonical/embededWast.lys +361) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +362) Unexpected token `fun` at test/fixtures/fixtures/canonical/embededWast.lys +363) Unexpected token ` + +` at test/fixtures/fixtures/canonical/embededWast.lys +364) Unexpected token `0` at test/fixtures/fixtures/canonical/embededWast.lys +365) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +366) Unexpected token `=` at test/fixtures/fixtures/canonical/embededWast.lys +367) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +368) Unexpected token `freeblock` at test/fixtures/fixtures/canonical/embededWast.lys +369) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys +370) Unexpected token `var` at test/fixtures/fixtures/canonical/embededWast.lys +371) Unexpected token ` + +` at test/fixtures/fixtures/canonical/embededWast.lys +372) Unexpected token `}` at test/fixtures/fixtures/canonical/embededWast.lys +373) Unexpected token `{` at test/fixtures/fixtures/canonical/embededWast.lys +374) Unexpected token `wasm` at test/fixtures/fixtures/canonical/embededWast.lys +375) Unexpected token `=%` at test/fixtures/fixtures/canonical/embededWast.lys diff --git a/test/fixtures/fixtures/parser-error/a.lys.syntax-error b/test/fixtures/fixtures/parser-error/a.lys.syntax-error new file mode 100644 index 0000000..cb91eec --- /dev/null +++ b/test/fixtures/fixtures/parser-error/a.lys.syntax-error @@ -0,0 +1 @@ +1) A type or effect was expected at test/fixtures/fixtures/parser-error/a.lys diff --git a/test/fixtures/fixtures/parser-error/b.lys.syntax-error b/test/fixtures/fixtures/parser-error/b.lys.syntax-error new file mode 100644 index 0000000..89a972f --- /dev/null +++ b/test/fixtures/fixtures/parser-error/b.lys.syntax-error @@ -0,0 +1,9 @@ +1) Unexpected token `1` at test/fixtures/fixtures/parser-error/b.lys +2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys +3) Unexpected token `=` at test/fixtures/fixtures/parser-error/b.lys +4) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys +5) Unexpected token `x` at test/fixtures/fixtures/parser-error/b.lys +6) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys +7) Unexpected token `val` at test/fixtures/fixtures/parser-error/b.lys +8) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys +9) Unexpected token `asd` at test/fixtures/fixtures/parser-error/b.lys diff --git a/test/fixtures/fixtures/parser-error/c.lys.syntax-error b/test/fixtures/fixtures/parser-error/c.lys.syntax-error new file mode 100644 index 0000000..cbdfe00 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/c.lys.syntax-error @@ -0,0 +1 @@ +1) Unexpected token `asd` at test/fixtures/fixtures/parser-error/c.lys diff --git a/test/fixtures/fixtures/parser-error/d.lys.syntax-error b/test/fixtures/fixtures/parser-error/d.lys.syntax-error new file mode 100644 index 0000000..2e595bd --- /dev/null +++ b/test/fixtures/fixtures/parser-error/d.lys.syntax-error @@ -0,0 +1,9 @@ +1) Unexpected token `1` at test/fixtures/fixtures/parser-error/d.lys +2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys +3) Unexpected token `=` at test/fixtures/fixtures/parser-error/d.lys +4) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys +5) Unexpected token `x` at test/fixtures/fixtures/parser-error/d.lys +6) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys +7) Unexpected token `val` at test/fixtures/fixtures/parser-error/d.lys +8) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys +9) Unexpected token `asd` at test/fixtures/fixtures/parser-error/d.lys diff --git a/test/fixtures/fixtures/parser-error/e.lys.syntax-error b/test/fixtures/fixtures/parser-error/e.lys.syntax-error new file mode 100644 index 0000000..e45b262 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/e.lys.syntax-error @@ -0,0 +1 @@ +1) Unexpected token `asd` at test/fixtures/fixtures/parser-error/e.lys diff --git a/test/fixtures/fixtures/parser-error/f.lys.syntax-error b/test/fixtures/fixtures/parser-error/f.lys.syntax-error new file mode 100644 index 0000000..fe9cfd7 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/f.lys.syntax-error @@ -0,0 +1 @@ +1) A type or effect was expected at test/fixtures/fixtures/parser-error/f.lys diff --git a/test/fixtures/fixtures/parser-error/h.lys.syntax-error b/test/fixtures/fixtures/parser-error/h.lys.syntax-error new file mode 100644 index 0000000..b1bb290 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/h.lys.syntax-error @@ -0,0 +1,2 @@ +1) Unexpected token `1` at test/fixtures/fixtures/parser-error/h.lys +2) A type or effect was expected at test/fixtures/fixtures/parser-error/h.lys diff --git a/test/fixtures/fixtures/parser-error/i.lys.syntax-error b/test/fixtures/fixtures/parser-error/i.lys.syntax-error new file mode 100644 index 0000000..57cf158 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/i.lys.syntax-error @@ -0,0 +1 @@ +1) A function name was expected at test/fixtures/fixtures/parser-error/i.lys diff --git a/test/fixtures/fixtures/parser-error/j.lys.syntax-error b/test/fixtures/fixtures/parser-error/j.lys.syntax-error new file mode 100644 index 0000000..ceed3c0 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/j.lys.syntax-error @@ -0,0 +1,3 @@ +1) Unexpected token `0` at test/fixtures/fixtures/parser-error/j.lys +2) Unexpected token `.` at test/fixtures/fixtures/parser-error/j.lys +3) A value was expected. at test/fixtures/fixtures/parser-error/j.lys diff --git a/test/fixtures/fixtures/parser-error/k.lys.syntax-error b/test/fixtures/fixtures/parser-error/k.lys.syntax-error new file mode 100644 index 0000000..f816779 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/k.lys.syntax-error @@ -0,0 +1,5 @@ +1) Unexpected token `1` at test/fixtures/fixtures/parser-error/k.lys +2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/k.lys +3) Unexpected token `map` at test/fixtures/fixtures/parser-error/k.lys +4) Unexpected token ` ` at test/fixtures/fixtures/parser-error/k.lys +5) Unexpected token `else` at test/fixtures/fixtures/parser-error/k.lys diff --git a/test/fixtures/fixtures/parser-error/l.lys.syntax-error b/test/fixtures/fixtures/parser-error/l.lys.syntax-error new file mode 100644 index 0000000..ef39014 --- /dev/null +++ b/test/fixtures/fixtures/parser-error/l.lys.syntax-error @@ -0,0 +1,4 @@ +1) Unexpected token `1` at test/fixtures/fixtures/parser-error/l.lys +2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/l.lys +3) Unexpected token `map` at test/fixtures/fixtures/parser-error/l.lys +4) An expression was expected at test/fixtures/fixtures/parser-error/l.lys diff --git a/test/fixtures/fixtures/parser-error/o.lys.syntax-error b/test/fixtures/fixtures/parser-error/o.lys.syntax-error new file mode 100644 index 0000000..53a8f8c --- /dev/null +++ b/test/fixtures/fixtures/parser-error/o.lys.syntax-error @@ -0,0 +1,2 @@ +1) Unexpected token `match` at test/fixtures/fixtures/parser-error/o.lys +2) A value was expected. at test/fixtures/fixtures/parser-error/o.lys diff --git a/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error b/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error new file mode 100644 index 0000000..0e44b75 --- /dev/null +++ b/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error @@ -0,0 +1,6 @@ +1) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys +2) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys +3) Unexpected token `f32` at test/fixtures/fixtures/sugar/enum-temperature.lys +4) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-temperature.lys +5) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-temperature.lys +6) Unexpected token `temperature` at test/fixtures/fixtures/sugar/enum-temperature.lys diff --git a/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error b/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error new file mode 100644 index 0000000..2cb6e2d --- /dev/null +++ b/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error @@ -0,0 +1,517 @@ +1) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +2) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +3) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +4) Unexpected token `false` at test/fixtures/fixtures/sugar/enum-unary.lys +5) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +6) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +7) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +8) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys +9) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +10) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +11) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +12) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +13) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +14) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +15) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys +16) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +17) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +18) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +19) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +20) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +21) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys +22) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +23) Unexpected token `!=` at test/fixtures/fixtures/sugar/enum-unary.lys +24) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +25) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +26) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +27) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +28) Unexpected token `true` at test/fixtures/fixtures/sugar/enum-unary.lys +29) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +30) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +31) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +32) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys +33) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +34) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +35) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +36) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +37) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +38) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +39) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys +40) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +41) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +42) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +43) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +44) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +45) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys +46) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +47) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys +48) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +49) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +50) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +51) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +52) Unexpected token `staticInstance` at test/fixtures/fixtures/sugar/enum-unary.lys +53) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +54) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +55) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +56) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +57) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +58) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +59) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +60) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +61) Unexpected token `apply` at test/fixtures/fixtures/sugar/enum-unary.lys +62) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +63) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +64) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +65) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +66) Unexpected token `staticInstance` at test/fixtures/fixtures/sugar/enum-unary.lys +67) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +68) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys +69) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +70) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +71) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +72) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +73) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +74) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +75) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +76) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +77) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +78) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +79) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +80) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys +81) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +82) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +83) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +84) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +85) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys +86) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +87) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +88) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +89) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +90) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +91) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +92) Unexpected token `staticInstance` at test/fixtures/fixtures/sugar/enum-unary.lys +93) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +94) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +95) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +96) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +97) Unexpected token `2` at test/fixtures/fixtures/sugar/enum-unary.lys +98) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +99) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +100) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +101) Unexpected token `u32` at test/fixtures/fixtures/sugar/enum-unary.lys +102) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +103) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +104) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys +105) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +106) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +107) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +108) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +109) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +110) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +111) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +112) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +113) Unexpected token `impl` at test/fixtures/fixtures/sugar/enum-unary.lys +114) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +115) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +116) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +117) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +118) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +119) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +120) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +121) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys +122) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +123) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys +124) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +125) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys +126) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +127) Unexpected token `!` at test/fixtures/fixtures/sugar/enum-unary.lys +128) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +129) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +130) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +131) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +132) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +133) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +134) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys +135) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +136) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +137) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +138) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +139) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +140) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +141) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys +142) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +143) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +144) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +145) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +146) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +147) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys +148) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +149) Unexpected token `!=` at test/fixtures/fixtures/sugar/enum-unary.lys +150) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +151) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +152) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +153) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +154) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +155) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +156) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +157) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +158) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys +159) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +160) Unexpected token `get_value` at test/fixtures/fixtures/sugar/enum-unary.lys +161) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +162) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys +163) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +164) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +165) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys +166) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +167) Unexpected token `get_value` at test/fixtures/fixtures/sugar/enum-unary.lys +168) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +169) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +170) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +171) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +172) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +173) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +174) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys +175) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +176) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +177) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +178) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +179) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +180) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +181) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys +182) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +183) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +184) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +185) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +186) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +187) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys +188) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +189) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys +190) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +191) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +192) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +193) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +194) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +195) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +196) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +197) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +198) Unexpected token `newValue` at test/fixtures/fixtures/sugar/enum-unary.lys +199) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +200) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +201) Unexpected token `0` at test/fixtures/fixtures/sugar/enum-unary.lys +202) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +203) Unexpected token `+` at test/fixtures/fixtures/sugar/enum-unary.lys +204) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +205) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys +206) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +207) Unexpected token `store` at test/fixtures/fixtures/sugar/enum-unary.lys +208) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +209) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +210) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +211) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +212) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +213) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys +214) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +215) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys +216) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +217) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +218) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +219) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +220) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +221) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys +222) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +223) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +224) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +225) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +226) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +227) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +228) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +229) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +230) Unexpected token `void` at test/fixtures/fixtures/sugar/enum-unary.lys +231) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +232) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +233) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +234) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +235) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +236) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +237) Unexpected token `newValue` at test/fixtures/fixtures/sugar/enum-unary.lys +238) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +239) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +240) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +241) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +242) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +243) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys +244) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +245) Unexpected token `set_value` at test/fixtures/fixtures/sugar/enum-unary.lys +246) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +247) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +248) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +249) Unexpected token `private` at test/fixtures/fixtures/sugar/enum-unary.lys +250) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +251) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +252) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +253) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +254) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +255) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +256) Unexpected token `0` at test/fixtures/fixtures/sugar/enum-unary.lys +257) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +258) Unexpected token `+` at test/fixtures/fixtures/sugar/enum-unary.lys +259) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +260) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys +261) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +262) Unexpected token `read` at test/fixtures/fixtures/sugar/enum-unary.lys +263) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +264) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +265) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +266) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +267) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +268) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys +269) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +270) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys +271) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +272) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +273) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +274) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +275) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +276) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys +277) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +278) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +279) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +280) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +281) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +282) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +283) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +284) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +285) Unexpected token `f32` at test/fixtures/fixtures/sugar/enum-unary.lys +286) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +287) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +288) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +289) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +290) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +291) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +292) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys +293) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +294) Unexpected token `get_value` at test/fixtures/fixtures/sugar/enum-unary.lys +295) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +296) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +297) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +298) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +299) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +300) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +301) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +302) Unexpected token `Celcius` at test/fixtures/fixtures/sugar/enum-unary.lys +303) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +304) Unexpected token `as` at test/fixtures/fixtures/sugar/enum-unary.lys +305) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +306) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +307) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +308) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +309) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +310) Unexpected token `value` at test/fixtures/fixtures/sugar/enum-unary.lys +311) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +312) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys +313) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys +314) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +315) Unexpected token `set_value` at test/fixtures/fixtures/sugar/enum-unary.lys +316) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +317) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +318) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +319) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +320) Unexpected token `as` at test/fixtures/fixtures/sugar/enum-unary.lys +321) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +322) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +323) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +324) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys +325) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +326) Unexpected token `malloc` at test/fixtures/fixtures/sugar/enum-unary.lys +327) Unexpected token `::` at test/fixtures/fixtures/sugar/enum-unary.lys +328) Unexpected token `memory` at test/fixtures/fixtures/sugar/enum-unary.lys +329) Unexpected token `::` at test/fixtures/fixtures/sugar/enum-unary.lys +330) Unexpected token `core` at test/fixtures/fixtures/sugar/enum-unary.lys +331) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +332) Unexpected token `|` at test/fixtures/fixtures/sugar/enum-unary.lys +333) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +334) Unexpected token `32` at test/fixtures/fixtures/sugar/enum-unary.lys +335) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +336) Unexpected token `<<` at test/fixtures/fixtures/sugar/enum-unary.lys +337) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +338) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys +339) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +340) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +341) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +342) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +343) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +344) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +345) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +346) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys +347) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +348) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +349) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +350) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +351) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +352) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +353) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +354) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +355) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +356) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +357) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +358) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +359) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +360) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +361) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +362) Unexpected token `value` at test/fixtures/fixtures/sugar/enum-unary.lys +363) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +364) Unexpected token `apply` at test/fixtures/fixtures/sugar/enum-unary.lys +365) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +366) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +367) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +368) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +369) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys +370) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +371) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys +372) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +373) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys +374) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +375) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +376) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +377) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +378) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +379) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +380) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +381) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +382) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +383) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +384) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +385) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys +386) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +387) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +388) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +389) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +390) Unexpected token `/* value: ref */` at test/fixtures/fixtures/sugar/enum-unary.lys +391) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +392) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys +393) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +394) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +395) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +396) Unexpected token `+` at test/fixtures/fixtures/sugar/enum-unary.lys +397) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +398) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys +399) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +400) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +401) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +402) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +403) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +404) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys +405) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +406) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +407) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +408) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +409) Unexpected token `1` at test/fixtures/fixtures/sugar/enum-unary.lys +410) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +411) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +412) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +413) Unexpected token `u32` at test/fixtures/fixtures/sugar/enum-unary.lys +414) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +415) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +416) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys +417) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +418) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys +419) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +420) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +421) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +422) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +423) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +424) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +425) Unexpected token `impl` at test/fixtures/fixtures/sugar/enum-unary.lys +426) Unexpected token ` + +` at test/fixtures/fixtures/sugar/enum-unary.lys +427) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +428) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +429) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys +430) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +431) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +432) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +433) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +434) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +435) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys +436) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +437) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys +438) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +439) Unexpected token `||` at test/fixtures/fixtures/sugar/enum-unary.lys +440) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +441) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +442) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +443) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +444) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys +445) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys +446) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys +447) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +448) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +449) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +450) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +451) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys +452) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +453) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys +454) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys +455) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +456) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys +457) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys +458) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys +459) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys +460) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +461) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys +462) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +463) Unexpected token ` +` at test/fixtures/fixtures/sugar/enum-unary.lys +464) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys +465) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +466) Unexpected token `>` at test/fixtures/fixtures/sugar/enum-unary.lys +467) Unexpected token `T` at test/fixtures/fixtures/sugar/enum-unary.lys +468) Unexpected token `<` at test/fixtures/fixtures/sugar/enum-unary.lys +469) Unexpected token `Option` at test/fixtures/fixtures/sugar/enum-unary.lys +470) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys +471) Unexpected token `impl` at test/fixtures/fixtures/sugar/enum-unary.lys diff --git a/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error b/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error new file mode 100644 index 0000000..2e9ec41 --- /dev/null +++ b/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error @@ -0,0 +1,32 @@ +1) Unexpected token `.` at test/fixtures/syntaxerrors/expectedtype.lys +2) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +3) Unexpected token `&` at test/fixtures/syntaxerrors/expectedtype.lys +4) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +5) Unexpected token `a` at test/fixtures/syntaxerrors/expectedtype.lys +6) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +7) Unexpected token `=` at test/fixtures/syntaxerrors/expectedtype.lys +8) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +9) Unexpected token `b` at test/fixtures/syntaxerrors/expectedtype.lys +10) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +11) Unexpected token `type` at test/fixtures/syntaxerrors/expectedtype.lys +12) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +13) Unexpected token `|` at test/fixtures/syntaxerrors/expectedtype.lys +14) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +15) Unexpected token `a` at test/fixtures/syntaxerrors/expectedtype.lys +16) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +17) Unexpected token `=` at test/fixtures/syntaxerrors/expectedtype.lys +18) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +19) Unexpected token `b` at test/fixtures/syntaxerrors/expectedtype.lys +20) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys +21) Unexpected token `type` at test/fixtures/syntaxerrors/expectedtype.lys +22) Unexpected token ` + + +` at test/fixtures/syntaxerrors/expectedtype.lys +23) Unexpected token `}` at test/fixtures/syntaxerrors/expectedtype.lys +24) Unexpected token `{` at test/fixtures/syntaxerrors/expectedtype.lys +25) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys +26) Unexpected token ` +` at test/fixtures/syntaxerrors/expectedtype.lys +27) Unexpected token `1` at test/fixtures/syntaxerrors/expectedtype.lys +28) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys diff --git a/test/fixtures/syntaxerrors/missingtype.lys.syntax-error b/test/fixtures/syntaxerrors/missingtype.lys.syntax-error new file mode 100644 index 0000000..5d905e0 --- /dev/null +++ b/test/fixtures/syntaxerrors/missingtype.lys.syntax-error @@ -0,0 +1 @@ +1) A type or effect was expected at test/fixtures/syntaxerrors/missingtype.lys diff --git a/test/fixtures/syntaxerrors/var.lys.syntax-error b/test/fixtures/syntaxerrors/var.lys.syntax-error new file mode 100644 index 0000000..ea506a7 --- /dev/null +++ b/test/fixtures/syntaxerrors/var.lys.syntax-error @@ -0,0 +1,12 @@ +1) Unexpected token `1` at test/fixtures/syntaxerrors/var.lys +2) Unexpected token ` ` at test/fixtures/syntaxerrors/var.lys +3) Unexpected token `=` at test/fixtures/syntaxerrors/var.lys +4) Unexpected token ` ` at test/fixtures/syntaxerrors/var.lys +5) Unexpected token `var` at test/fixtures/syntaxerrors/var.lys +6) Unexpected token ` + +` at test/fixtures/syntaxerrors/var.lys +7) Unexpected token `var` at test/fixtures/syntaxerrors/var.lys +8) Unexpected token ` ` at test/fixtures/syntaxerrors/var.lys +9) Unexpected token `var` at test/fixtures/syntaxerrors/var.lys +10) A value was expected. at test/fixtures/syntaxerrors/var.lys diff --git a/test/fixtures/syntaxerrors/wasm.lys.syntax-error b/test/fixtures/syntaxerrors/wasm.lys.syntax-error new file mode 100644 index 0000000..91a9f57 --- /dev/null +++ b/test/fixtures/syntaxerrors/wasm.lys.syntax-error @@ -0,0 +1,4 @@ +1) Unexpected token `)` at test/fixtures/syntaxerrors/wasm.lys +2) Unexpected token `(` at test/fixtures/syntaxerrors/wasm.lys +3) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys +4) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys diff --git a/test/helpers.lys b/test/helpers.lys new file mode 100644 index 0000000..27e575e --- /dev/null +++ b/test/helpers.lys @@ -0,0 +1,101 @@ +import support::env +import support::test +import src::helpers +import src::lexer::lexer +import src::lexer::tokens +import src::parser::grammar +import src::parser::parser +import src::parser::lysgrammar + +fun testHelpers(): void = { + START("Helpers") + stringBuilder() + messageCollector() + testContextWithErrors() + testContextWithNoErrors() + END() +} + +fun stringBuilder(): void = { + START("String builder") + + val sb = src::stringbuilder::StringBuilder() + + mustEqual(sb.toString(), "", "Empty string builder must yield an empty string") + + mustEqual(sb.isEmpty(), true, "StringBuilder should start empty") + + sb.append("") + + mustEqual(sb.isEmpty(), true, "Empty string builder isEmpty") + + mustEqual(sb.toString(), "", "Empty string builder with empty string must yield an empty string") + sb.append("a").append(" ").append("").append("\nvv") + + mustEqual(sb.toString(), "a \nvv", "Test with chained appends") + + END() +} + + +fun messageCollector(): void = { + START("Message collector") + + val sb = src::stringbuilder::StringBuilder() + + val mc = src::compiler::messagecollector::MessageCollector() + + mustEqual(sb.toString(), "", "Print no errors") + + mc.append("Hello", src::compiler::messagecollector::SourcePosition("testModule", 0x0, 0x1)) + + END() +} + + +fun testContextWithNoErrors(): void = { + START("CompilerContext with no errors") + + val sb = src::stringbuilder::StringBuilder() + + val cc = src::compiler::context::CompilerContext() + + cc.getModuleByContent("module.lys", "test::module", "fun test(): i32 = 1") + cc.printErrors(sb) + mustEqual(sb.toString(), "", "NO ERROR") + + END() +} + +fun testContextWithErrors(): void = { + { + START("CompilerContext with one error") + val sb = src::stringbuilder::StringBuilder() + + val cc = src::compiler::context::CompilerContext() + + cc.getModuleByContent("module.lys", "test::module", "fun test(): = 1") + + mustEqual(cc.printErrors(sb), 1, "An error must be registered") + support::env::printf("Given errors:") + support::env::printf(sb.toString()) + + END() + } + { + START("CompilerContext with three errors in two files") + val sb = src::stringbuilder::StringBuilder() + + val cc = src::compiler::context::CompilerContext() + + cc.getModuleByContent("moduleOk.lys", "test::moduleOk", "fun test(): i32 = 1") + cc.getModuleByContent("module.lys", "test::module", "fun test(): = ") + cc.getModuleByContent("module2.lys", "test::module2", "fun test(asd: ): void = {}") + + mustEqual(cc.printErrors(sb), 3, "Three errors must be registered") + support::env::printf("Given errors:") + support::env::printf(sb.toString()) + + END() + } +} \ No newline at end of file diff --git a/test/parser.spec.ts b/test/parser.spec.ts index 32ecb9b..ab0bb94 100755 --- a/test/parser.spec.ts +++ b/test/parser.spec.ts @@ -1,4 +1,4 @@ -import { folderBasedTest, WRITE_TO_FILE } from "./fbt"; +import { folderBasedTest } from "./fbt"; import { resolve } from "path"; import tokenizer from "../dist"; @@ -27,3 +27,15 @@ folderBasedTest( }, ".lys.ast-2" ); + + +folderBasedTest( + resolve(__dirname, "./fixtures/") + "/**/*.lys", + async (source, fileName) => { + const instance = await tokenizer(); + const result = instance.parseAndEmitErrors(fileName, fileName, source); + + return result || null; + }, + ".syntax-error" +); diff --git a/test/test.lys b/test/test.lys index b465ee4..fe5d0c2 100644 --- a/test/test.lys +++ b/test/test.lys @@ -33,6 +33,8 @@ fun test(): void = { errorRecovery() lysGrammar() END() + + test::helpers::testHelpers() } fun case1(): void = { From 455fa165191c91502ca9d50eea181d94288e1367 Mon Sep 17 00:00:00 2001 From: Agustin Mendez Date: Sun, 29 Dec 2019 20:25:40 -0300 Subject: [PATCH 2/4] line mapper --- src/compiler/linemapper.lys | 159 ++++++++++++++++++++++++++++++++++++ test/helpers.lys | 59 +++++++++++++ 2 files changed, 218 insertions(+) create mode 100644 src/compiler/linemapper.lys diff --git a/src/compiler/linemapper.lys b/src/compiler/linemapper.lys new file mode 100644 index 0000000..2db6d63 --- /dev/null +++ b/src/compiler/linemapper.lys @@ -0,0 +1,159 @@ +import src::helpers +import src::stringbuilder + +/** + * LineMapper is an utility to get the line out of a position in a string. + * It splits the string in Lines and then it creates a tree to find the line using + * binary search. + * + * The current tree structure looks like a linked list, + * + * LineCons + * ├LineCons + * │ ├LineCons + * │ │ ├LineCons + * │ │ │ ├LineCons + * │ │ │ │ ├LineCons + * │ │ │ │ │ ├LineCons + * │ │ │ │ │ │ ├LineCons + * │ │ │ │ │ │ │ ├LineCons + * │ │ │ │ │ │ │ │ ├LineCons + * │ │ │ │ │ │ │ │ │ ├LineCons + * │ │ │ │ │ │ │ │ │ │ ├Line(0,0,5) + * │ │ │ │ │ │ │ │ │ │ └Line(1,5,8) + * │ │ │ │ │ │ │ │ │ └Line(2,8,10) + * │ │ │ │ │ │ │ │ └Line(3,10,12) + * │ │ │ │ │ │ │ └Line(4,12,16) + * │ │ │ │ │ │ └Line(5,16,21) + * │ │ │ │ │ └Line(6,21,24) + * │ │ │ │ └Line(7,24,26) + * │ │ │ └Line(8,26,28) + * │ │ └Line(9,28,32) + * │ └Line(10,32,33) + * └Line(11,33,33) + * + * With a little of code interview algorithmia, it can be turned to a balanced + * binary search tree, making the lookups way faster. + */ + +enum LineData { + NoLine + Line(line: u32, start: u32, end: u32) + LineCons(left: LineData, right: LineData) +} + +struct LineMapper(source: string, lineData: LineData | Nil) + +impl LineData { + + #[getter] + fun start(self: LineData): u32 = match self { + case is LineCons(left, right) -> left.start + case is Line(line, start) -> start + case is NoLine -> 0x7ffffff + } + + #[getter] + fun end(self: LineData): u32 = match self { + case is LineCons(left, right) -> right.end + case is Line(line, start, end) -> end + case is NoLine -> 0x0 + } + + #[method] + fun getLine(self: LineData, position: u32): Line | NoLine = match self { + case x is LineCons(left, right) -> + if (left.start <= position && position < left.end) + left.getLine(position) + else + right.getLine(position) + case x is Line -> x + case is NoLine -> NoLine + } + + #[method] + fun printTo(self: LineData, sb: StringBuilder, indentation: i32): void = { + match self { + case is NoLine -> sb.append("NULL") + case is Line(line, start, end) -> + sb + .append("Line(") + .append(string.stringify(line)) + .append(",") + .append(string.stringify(start)) + .append(",") + .append(string.stringify(end)) + .append(")\n") + case is LineCons(left, right) -> { + val offset2 = repeat(" │", indentation) + sb.append("LineCons\n") + sb.append(offset2).append(" ├") + left.printTo(sb, indentation + 1) + sb.append(offset2).append(" └") + right.printTo(sb, indentation + 1) + } + } + } +} + +impl LineMapper { + fun apply(source: string): LineMapper = LineMapper(source, Nil) + + fun initializeData(source: string): LineData = { + var start = 0x0 + var end = start + val len = source.length + var currentLine = 0x0 + val defaultLine = Line(0x0, 0x0, 0x0) + var ret: LineData = defaultLine + + loop if (end < len) { + val char = source[end] + end = end + 0x1 + + if (char == 0xD && (end + 0x1) < len) { // \r + if (source[end + 0x1] == 0xA) { // \n + end = end + 0x1 + + if (currentLine == 0x0) { + ret = Line(0x0, start, end) + } else { + ret = LineCons(ret, Line(currentLine, start, end)) + } + currentLine = currentLine + 0x1 + start = end + } + } else if (char == 0xA || char == 0x2028 || char == 0x2029) { // \n + if (currentLine == 0x0) { + ret = Line(0x0, start, end) + } else { + ret = LineCons(ret, Line(currentLine, start, end)) + } + currentLine = currentLine + 0x1 + start = end + } + + continue + } + if (currentLine == 0x0) { + ret = Line(0x0, start, end) + } else { + ret = LineCons(ret, Line(currentLine, start, end)) + } + ret + } + + #[method] + private fun ensureLineData(self: LineMapper): LineData = match self.lineData { + case is Nil -> { + self.lineData = initializeData(self.source) + self.ensureLineData() + } + case x is LineData -> x + } + + #[method] + fun getLine(self: LineMapper, position: u32): Line | NoLine = { + self.ensureLineData().getLine(position) + } +} \ No newline at end of file diff --git a/test/helpers.lys b/test/helpers.lys index 27e575e..8fd64b3 100644 --- a/test/helpers.lys +++ b/test/helpers.lys @@ -6,6 +6,7 @@ import src::lexer::tokens import src::parser::grammar import src::parser::parser import src::parser::lysgrammar +import src::compiler::linemapper fun testHelpers(): void = { START("Helpers") @@ -13,6 +14,7 @@ fun testHelpers(): void = { messageCollector() testContextWithErrors() testContextWithNoErrors() + lineMapper() END() } @@ -98,4 +100,61 @@ fun testContextWithErrors(): void = { END() } +} + +fun testLine(lm: LineData, position: i32, expectedLine: i32): void = { + match lm.getLine(position as u32) { + case is Line(line) -> mustEqual(line, expectedLine as u32, "Line " ++ string.stringify(expectedLine)) + else -> verify(false, "Line " ++ string.stringify(expectedLine) ++ " doesn't exist") + } +} + +fun lineMapper(): void = { + START("Line data") + val sb = src::stringbuilder::StringBuilder() + val lm = LineMapper.initializeData( + "aaaa\nbb\n\r\nc\nddd\naaaa\nbb\n\r\nc\nddd\n\n" + ) + + testLine(lm, 0, 0) + testLine(lm, 1, 0) + testLine(lm, 2, 0) + testLine(lm, 3, 0) + testLine(lm, 4, 0) + testLine(lm, 12, 4) + testLine(lm, 28, 9) + testLine(lm, 120, 11) + + lm.printTo(sb, 0) + val res = sb.toString() + + mustEqual(res, + "LineCons\n" ++ + " ├LineCons\n" ++ + " │ ├LineCons\n" ++ + " │ │ ├LineCons\n" ++ + " │ │ │ ├LineCons\n" ++ + " │ │ │ │ ├LineCons\n" ++ + " │ │ │ │ │ ├LineCons\n" ++ + " │ │ │ │ │ │ ├LineCons\n" ++ + " │ │ │ │ │ │ │ ├LineCons\n" ++ + " │ │ │ │ │ │ │ │ ├LineCons\n" ++ + " │ │ │ │ │ │ │ │ │ ├LineCons\n" ++ + " │ │ │ │ │ │ │ │ │ │ ├Line(0,0,5)\n" ++ + " │ │ │ │ │ │ │ │ │ │ └Line(1,5,8)\n" ++ + " │ │ │ │ │ │ │ │ │ └Line(2,8,10)\n" ++ + " │ │ │ │ │ │ │ │ └Line(3,10,12)\n" ++ + " │ │ │ │ │ │ │ └Line(4,12,16)\n" ++ + " │ │ │ │ │ │ └Line(5,16,21)\n" ++ + " │ │ │ │ │ └Line(6,21,24)\n" ++ + " │ │ │ │ └Line(7,24,26)\n" ++ + " │ │ │ └Line(8,26,28)\n" ++ + " │ │ └Line(9,28,32)\n" ++ + " │ └Line(10,32,33)\n" ++ + " └Line(11,33,33)\n", "Unbalanced tree") + + support::env::printf(res) + + + END() } \ No newline at end of file From e243aa7c7b68ea38eb4a9671a486add63d6d303f Mon Sep 17 00:00:00 2001 From: Agustin Mendez Date: Mon, 30 Dec 2019 11:19:06 -0300 Subject: [PATCH 3/4] proper error reporting --- src/compiler/context.lys | 125 +- src/compiler/linemapper.lys | 24 +- src/compiler/messagecollector.lys | 12 +- .../canonical/effects.lys.syntax-error | 1135 +++++- .../fixtures/canonical/embededWast.lys | 2 +- .../fixtures/canonical/embededWast.lys.ast | 752 ++-- .../canonical/embededWast.lys.lys.ast-2 | 143 + .../fixtures/canonical/embededWast.lys.result | 4 +- .../canonical/embededWast.lys.syntax-error | 433 --- .../fixtures/parser-error/a.lys.syntax-error | 6 +- .../fixtures/parser-error/b.lys.syntax-error | 54 +- .../fixtures/parser-error/c.lys.syntax-error | 6 +- .../fixtures/parser-error/d.lys.syntax-error | 54 +- .../fixtures/parser-error/e.lys.syntax-error | 6 +- .../fixtures/parser-error/f.lys.syntax-error | 6 +- .../fixtures/parser-error/h.lys.syntax-error | 12 +- .../fixtures/parser-error/i.lys.syntax-error | 6 +- .../fixtures/parser-error/j.lys.syntax-error | 18 +- .../fixtures/parser-error/k.lys.syntax-error | 30 +- .../fixtures/parser-error/l.lys.syntax-error | 24 +- .../fixtures/parser-error/o.lys.syntax-error | 12 +- .../sugar/enum-temperature.lys.syntax-error | 42 +- .../sugar/enum-unary.lys.syntax-error | 3241 ++++++++++++++--- .../expectedtype.lys.syntax-error | 175 +- .../syntaxerrors/missingtype.lys.syntax-error | 6 +- .../syntaxerrors/var.lys.syntax-error | 65 +- .../syntaxerrors/wasm.lys.syntax-error | 21 +- test/helpers.lys | 27 +- test/parser.spec.ts | 13 +- 29 files changed, 4757 insertions(+), 1697 deletions(-) delete mode 100644 test/fixtures/fixtures/canonical/embededWast.lys.syntax-error diff --git a/src/compiler/context.lys b/src/compiler/context.lys index 56061d8..4e8ece0 100644 --- a/src/compiler/context.lys +++ b/src/compiler/context.lys @@ -3,6 +3,7 @@ import src::compiler::nodes import src::parser::parser import src::helpers import src::stringbuilder +import src::compiler::linemapper enum ModuleMap { EmptyModule @@ -12,7 +13,8 @@ enum ModuleMap { source: string, document: CodeNode, phase: i32, - errors: i32 + errors: i32, + lineMapper: LineMapper ) ModuleCons(head: Module, tail: ModuleMap) } @@ -24,15 +26,36 @@ struct CompilerContext( impl ModuleMap { #[method] - fun findModule(self: ModuleMap, moduleNameToFind: string): Module | EmptyModule = { + fun findModuleByPath(self: ModuleMap, path: string): Module | EmptyModule = { match self { case x is EmptyModule -> x - case x is Module(moduleName) -> if (moduleName == moduleNameToFind) x else EmptyModule + case theModule is Module -> + if (theModule.path == path) + theModule + else + EmptyModule + case is ModuleCons(head, tail) -> + if (head.path == path) + head + else + tail.findModuleByPath(path) + } + } + + #[method] + fun findModule(self: ModuleMap, moduleName: string): Module | EmptyModule = { + match self { + case x is EmptyModule -> x + case theModule is Module -> + if (theModule.moduleName == moduleName) + theModule + else + EmptyModule case is ModuleCons(head, tail) -> - if (head.moduleName == moduleNameToFind) + if (head.moduleName == moduleName) head else - tail.findModule(moduleNameToFind) + tail.findModule(moduleName) } } } @@ -47,12 +70,12 @@ impl CompilerContext { val module = match ast { case is Nil -> { self.messageCollector.append("Error parsing file: " ++ path, SourcePosition(path, 0x0, 0x1)) - Module(moduleName, path, source, EmptyNode, 0, 1) + Module(moduleName, path, source, EmptyNode, 0, 1, LineMapper(source)) } case ast is AstNode -> { val errors = collectErrors(ast, self.messageCollector, path) val code = src::compiler::phases::cannonical::processNode(ast) - Module(moduleName, path, source, code, 0, errors) + Module(moduleName, path, source, code, 0, errors, LineMapper(source)) } } @@ -68,15 +91,79 @@ impl CompilerContext { fun findModule(self: CompilerContext, moduleName: string): Module | EmptyModule = self.modules.findModule(moduleName) - fun printErrors(head: Message, sb: StringBuilder, fileName: string, counter: i32): i32 = match head { + #[method] + fun findModuleByPath(self: CompilerContext, path: string): Module | EmptyModule = + self.modules.findModuleByPath(path) + + #[method] + fun printErrors(self: CompilerContext, head: Message, sb: StringBuilder, path: string, counter: i32): i32 = match head { case is PositionCapableMessage(message, position) -> { - if (position.moduleName == fileName) { - sb.append(string.stringify(counter + 1)) - .append(") ") - .append(message) - .append(" at ") - .append(position.moduleName) - .append("\n") + if (position.path == path) { + var module = self.findModuleByPath(path) + + match module { + case module is Module -> { + val start = module.lineMapper.getLine(position.start) + val end = module.lineMapper.getLine(position.end) + + sb.append(" ") + .append(string.stringify(counter + 1)) + .append(") ") + .append(message) + .append(" at ") + .append(position.path) + .append(":") + .append(string.stringify(start.line + 0x1)) + .append(":") + .append(string.stringify(position.start - start.start)) + .append("\n") + + if (start.line == end.line) { + + sb + .append("\u001b[36m") // Gutter start + .append(" │") + .append("\u001b[0m\n") // reset + + .append("\u001b[36m") // Gutter start + + val loc = (start.line + 0x1) as i32 + + if (loc < 10000) { sb.append(" ") } + if (loc < 1000) { sb.append(" ") } + if (loc < 100) { sb.append(" ") } + if (loc < 10) { sb.append(" ") } + + sb.append(string.stringify(loc)) + .append("│ ") + .append("\u001b[0m") // reset + .append(module.source.substring(start.start as i32, start.end as i32)) + .append("\n") + + // TODO: trim trailing newline in the line source + + sb.append("\u001b[36m") // Gutter start + .append(" │ ") + .append("\u001b[0m") // reset + .append(repeat(" ", (position.start - start.start) as i32)) + .append("\u001b[91m") // red color + .append(repeat("^", (position.end - position.start) as i32)) + .append("\u001b[0m") // reset + .append("\n") + } + + sb.append("\n") + + } + else -> { + sb.append(string.stringify(counter + 1)) + .append(") ") + .append(message) + .append(" at ") + .append(position.path) + .append("\n") + } + } counter + 1 } else { @@ -85,9 +172,9 @@ impl CompilerContext { } case is MessageCons(head, tail) -> { // Print the first error, return the current number - val newNumber = printErrors(head, sb, fileName, counter) + val newNumber = printErrors(self, head, sb, path, counter) // Print the rest of the errors - printErrors(tail, sb, fileName, newNumber) + printErrors(self, tail, sb, path, newNumber) } else -> counter } @@ -101,7 +188,7 @@ impl CompilerContext { match current { case is ModuleCons(head, tail) -> { val nsb = StringBuilder() - errors = printErrors(self.messageCollector.headMessage, nsb, head.path, errors) + errors = printErrors(self, self.messageCollector.headMessage, nsb, head.path, errors) if (!nsb.isEmpty()) { sb.append(head.path).append("\n").append(nsb.toString()) @@ -112,7 +199,7 @@ impl CompilerContext { } case head is Module -> { val nsb = StringBuilder() - errors = printErrors(self.messageCollector.headMessage, sb, head.path, errors) + errors = printErrors(self, self.messageCollector.headMessage, sb, head.path, errors) if (!nsb.isEmpty()) { sb.append(head.path).append("\n").append(nsb.toString()) diff --git a/src/compiler/linemapper.lys b/src/compiler/linemapper.lys index 2db6d63..822958d 100644 --- a/src/compiler/linemapper.lys +++ b/src/compiler/linemapper.lys @@ -46,6 +46,13 @@ struct LineMapper(source: string, lineData: LineData | Nil) impl LineData { + #[getter] + fun line(self: LineData): u32 = match self { + case is LineCons(left) -> left.line + case is Line(line) -> line + case is NoLine -> 0x0 + } + #[getter] fun start(self: LineData): u32 = match self { case is LineCons(left, right) -> left.start @@ -71,6 +78,16 @@ impl LineData { case is NoLine -> NoLine } + #[method] + fun getLinePosition(self: LineData, line: u32): Line | NoLine = match self { + case x is LineCons(left, right) -> match left.getLinePosition(line) { + case x is NoLine -> right.getLinePosition(line) + case x is Line -> x + } + case x is Line -> if(x.line == line) x else NoLine + case is NoLine -> NoLine + } + #[method] fun printTo(self: LineData, sb: StringBuilder, indentation: i32): void = { match self { @@ -153,7 +170,12 @@ impl LineMapper { } #[method] - fun getLine(self: LineMapper, position: u32): Line | NoLine = { + fun getLine(self: LineMapper, position: u32): LineData = { self.ensureLineData().getLine(position) } + + #[method] + fun getLinePosition(self: LineMapper, line: u32): LineData = { + self.ensureLineData().getLinePosition(line) + } } \ No newline at end of file diff --git a/src/compiler/messagecollector.lys b/src/compiler/messagecollector.lys index 02f2918..fa20a8a 100644 --- a/src/compiler/messagecollector.lys +++ b/src/compiler/messagecollector.lys @@ -1,7 +1,7 @@ import src::stringbuilder import src::parser::parser -struct SourcePosition(moduleName: string, start: u32, end: u32) +struct SourcePosition(path: string, start: u32, end: u32) enum Message { HeadMessage @@ -27,16 +27,16 @@ impl MessageCollector { } } -fun collectErrors(node: AstNode, messageCollector: MessageCollector, moduleName: string): i32 = match node { +fun collectErrors(node: AstNode, messageCollector: MessageCollector, path: string): i32 = match node { case is SyntaxError(token, message) -> { - messageCollector.append(message, SourcePosition(moduleName, token.start, token.end)) + messageCollector.append(message, SourcePosition(path, token.start, token.end)) 1 } case is UnexpectedToken(token, value) -> { - messageCollector.append("Unexpected token \"" ++ value ++ "\"", SourcePosition(moduleName, token.start, token.end)) + messageCollector.append("Unexpected token \"" ++ value ++ "\"", SourcePosition(path, token.start, token.end)) 1 } - case is Node(name, child) -> collectErrors(child, messageCollector, moduleName) - case is AstCons(head, tail) -> collectErrors(head, messageCollector, moduleName) + collectErrors(tail, messageCollector, moduleName) + case is Node(name, child) -> collectErrors(child, messageCollector, path) + case is AstCons(head, tail) -> collectErrors(head, messageCollector, path) + collectErrors(tail, messageCollector, path) else -> 0 } \ No newline at end of file diff --git a/test/fixtures/fixtures/canonical/effects.lys.syntax-error b/test/fixtures/fixtures/canonical/effects.lys.syntax-error index 936f4bc..d64a681 100644 --- a/test/fixtures/fixtures/canonical/effects.lys.syntax-error +++ b/test/fixtures/fixtures/canonical/effects.lys.syntax-error @@ -1,183 +1,952 @@ -1) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys -2) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -3) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys -4) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -5) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -6) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys -7) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -8) Unexpected token `/` at test/fixtures/fixtures/canonical/effects.lys -9) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -10) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys -11) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -12) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -13) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys -14) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -15) Unexpected token `else` at test/fixtures/fixtures/canonical/effects.lys -16) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -17) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys -18) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -19) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -20) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -21) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -22) Unexpected token `raise` at test/fixtures/fixtures/canonical/effects.lys -23) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -24) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -25) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys -26) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -27) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -28) Unexpected token `0` at test/fixtures/fixtures/canonical/effects.lys -29) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -30) Unexpected token `==` at test/fixtures/fixtures/canonical/effects.lys -31) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -32) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys -33) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -34) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -35) Unexpected token `if` at test/fixtures/fixtures/canonical/effects.lys -36) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -37) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -38) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys -39) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -40) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys -41) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -42) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys -43) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -44) Unexpected token `>` at test/fixtures/fixtures/canonical/effects.lys -45) Unexpected token `_` at test/fixtures/fixtures/canonical/effects.lys -46) Unexpected token `<` at test/fixtures/fixtures/canonical/effects.lys -47) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -48) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -49) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -50) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys -51) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -52) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -53) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys -54) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -55) Unexpected token `,` at test/fixtures/fixtures/canonical/effects.lys -56) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys -57) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -58) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -59) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys -60) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -61) Unexpected token `zeroDiv` at test/fixtures/fixtures/canonical/effects.lys -62) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -63) Unexpected token `fun` at test/fixtures/fixtures/canonical/effects.lys -64) Unexpected token ` - -` at test/fixtures/fixtures/canonical/effects.lys -65) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys -66) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -67) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys -68) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -69) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -70) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys -71) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -72) Unexpected token `/` at test/fixtures/fixtures/canonical/effects.lys -73) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -74) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys -75) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -76) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -77) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys -78) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -79) Unexpected token `else` at test/fixtures/fixtures/canonical/effects.lys -80) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -81) Unexpected token `}` at test/fixtures/fixtures/canonical/effects.lys -82) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -83) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -84) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -85) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -86) Unexpected token `raise` at test/fixtures/fixtures/canonical/effects.lys -87) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -88) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -89) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys -90) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -91) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -92) Unexpected token `0` at test/fixtures/fixtures/canonical/effects.lys -93) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -94) Unexpected token `==` at test/fixtures/fixtures/canonical/effects.lys -95) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -96) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys -97) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -98) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -99) Unexpected token `if` at test/fixtures/fixtures/canonical/effects.lys -100) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -101) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -102) Unexpected token `{` at test/fixtures/fixtures/canonical/effects.lys -103) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -104) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys -105) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -106) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys -107) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -108) Unexpected token `>` at test/fixtures/fixtures/canonical/effects.lys -109) Unexpected token `_` at test/fixtures/fixtures/canonical/effects.lys -110) Unexpected token `|` at test/fixtures/fixtures/canonical/effects.lys -111) Unexpected token `exn` at test/fixtures/fixtures/canonical/effects.lys -112) Unexpected token `<` at test/fixtures/fixtures/canonical/effects.lys -113) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -114) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -115) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -116) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys -117) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -118) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -119) Unexpected token `b` at test/fixtures/fixtures/canonical/effects.lys -120) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -121) Unexpected token `,` at test/fixtures/fixtures/canonical/effects.lys -122) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys -123) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -124) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -125) Unexpected token `a` at test/fixtures/fixtures/canonical/effects.lys -126) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -127) Unexpected token `>` at test/fixtures/fixtures/canonical/effects.lys -128) Unexpected token `T` at test/fixtures/fixtures/canonical/effects.lys -129) Unexpected token `<` at test/fixtures/fixtures/canonical/effects.lys -130) Unexpected token `safeDiv` at test/fixtures/fixtures/canonical/effects.lys -131) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -132) Unexpected token `fun` at test/fixtures/fixtures/canonical/effects.lys -133) Unexpected token ` - -` at test/fixtures/fixtures/canonical/effects.lys -134) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys -135) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -136) Unexpected token `*` at test/fixtures/fixtures/canonical/effects.lys -137) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -138) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys -139) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -140) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys -141) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -142) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys -143) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -144) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -145) Unexpected token `)` at test/fixtures/fixtures/canonical/effects.lys -146) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys -147) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -148) Unexpected token `:` at test/fixtures/fixtures/canonical/effects.lys -149) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys -150) Unexpected token `(` at test/fixtures/fixtures/canonical/effects.lys -151) Unexpected token `sqr` at test/fixtures/fixtures/canonical/effects.lys -152) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -153) Unexpected token `fun` at test/fixtures/fixtures/canonical/effects.lys -154) Unexpected token ` -` at test/fixtures/fixtures/canonical/effects.lys -155) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys -156) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -157) Unexpected token `*` at test/fixtures/fixtures/canonical/effects.lys -158) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -159) Unexpected token `x` at test/fixtures/fixtures/canonical/effects.lys -160) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -161) Unexpected token `=` at test/fixtures/fixtures/canonical/effects.lys -162) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -163) Unexpected token `i32` at test/fixtures/fixtures/canonical/effects.lys -164) Unexpected token ` ` at test/fixtures/fixtures/canonical/effects.lys -165) Unexpected token `<>` at test/fixtures/fixtures/canonical/effects.lys -166) A type or effect was expected at test/fixtures/fixtures/canonical/effects.lys + 1) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:27:0 + │ + 27│ } + │ ^ + + 2) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:26:3 + + 3) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:26:2 + │ + 26│ } + + │ ^ + + 4) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:26:0 + │ + 26│ } + + │ ^^ + + 5) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:25:9 + + 6) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:25:8 + │ + 25│ a / b + + │ ^ + + 7) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:7 + │ + 25│ a / b + + │ ^ + + 8) Unexpected token "/" at test/fixtures/fixtures/canonical/effects.lys:25:6 + │ + 25│ a / b + + │ ^ + + 9) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:5 + │ + 25│ a / b + + │ ^ + + 10) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:25:4 + │ + 25│ a / b + + │ ^ + + 11) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:0 + │ + 25│ a / b + + │ ^^^^ + + 12) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:24:10 + + 13) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:24:9 + │ + 24│ } else { + + │ ^ + + 14) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:8 + │ + 24│ } else { + + │ ^ + + 15) Unexpected token "else" at test/fixtures/fixtures/canonical/effects.lys:24:4 + │ + 24│ } else { + + │ ^^^^ + + 16) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:3 + │ + 24│ } else { + + │ ^ + + 17) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:24:2 + │ + 24│ } else { + + │ ^ + + 18) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:0 + │ + 24│ } else { + + │ ^^ + + 19) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:23:11 + + 20) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:23:10 + │ + 23│ raise() + + │ ^ + + 21) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:23:9 + │ + 23│ raise() + + │ ^ + + 22) Unexpected token "raise" at test/fixtures/fixtures/canonical/effects.lys:23:4 + │ + 23│ raise() + + │ ^^^^^ + + 23) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:23:0 + │ + 23│ raise() + + │ ^^^^ + + 24) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:22:15 + + 25) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:22:14 + │ + 22│ if (b == 0) { + + │ ^ + + 26) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:13 + │ + 22│ if (b == 0) { + + │ ^ + + 27) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:22:12 + │ + 22│ if (b == 0) { + + │ ^ + + 28) Unexpected token "0" at test/fixtures/fixtures/canonical/effects.lys:22:11 + │ + 22│ if (b == 0) { + + │ ^ + + 29) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:10 + │ + 22│ if (b == 0) { + + │ ^ + + 30) Unexpected token "==" at test/fixtures/fixtures/canonical/effects.lys:22:8 + │ + 22│ if (b == 0) { + + │ ^^ + + 31) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:7 + │ + 22│ if (b == 0) { + + │ ^ + + 32) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:22:6 + │ + 22│ if (b == 0) { + + │ ^ + + 33) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:22:5 + │ + 22│ if (b == 0) { + + │ ^ + + 34) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:4 + │ + 22│ if (b == 0) { + + │ ^ + + 35) Unexpected token "if" at test/fixtures/fixtures/canonical/effects.lys:22:2 + │ + 22│ if (b == 0) { + + │ ^^ + + 36) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:0 + │ + 22│ if (b == 0) { + + │ ^^ + + 37) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:21:40 + + 38) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:21:39 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 39) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:38 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 40) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:21:37 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 41) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:36 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 42) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:33 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^^^ + + 43) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:32 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 44) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:21:31 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 45) Unexpected token "_" at test/fixtures/fixtures/canonical/effects.lys:21:30 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 46) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:21:29 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 47) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:28 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 48) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:27 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 49) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:21:26 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 50) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:23 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^^^ + + 51) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:22 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 52) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:21 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 53) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:21:20 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 54) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:19 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 55) Unexpected token "," at test/fixtures/fixtures/canonical/effects.lys:21:18 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 56) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:15 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^^^ + + 57) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:14 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 58) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:13 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 59) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:21:12 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 60) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:21:11 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 61) Unexpected token "zeroDiv" at test/fixtures/fixtures/canonical/effects.lys:21:4 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^^^^^^^ + + 62) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:3 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^ + + 63) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:21:0 + │ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + + │ ^^^ + + 64) Unexpected token " + +" at test/fixtures/fixtures/canonical/effects.lys:19:1 + + 65) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:19:0 + │ + 19│ } + + │ ^ + + 66) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:18:3 + + 67) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:18:2 + │ + 18│ } + + │ ^ + + 68) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:18:0 + │ + 18│ } + + │ ^^ + + 69) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:17:9 + + 70) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:17:8 + │ + 17│ a / b + + │ ^ + + 71) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:7 + │ + 17│ a / b + + │ ^ + + 72) Unexpected token "/" at test/fixtures/fixtures/canonical/effects.lys:17:6 + │ + 17│ a / b + + │ ^ + + 73) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:5 + │ + 17│ a / b + + │ ^ + + 74) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:17:4 + │ + 17│ a / b + + │ ^ + + 75) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:0 + │ + 17│ a / b + + │ ^^^^ + + 76) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:16:10 + + 77) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:16:9 + │ + 16│ } else { + + │ ^ + + 78) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:8 + │ + 16│ } else { + + │ ^ + + 79) Unexpected token "else" at test/fixtures/fixtures/canonical/effects.lys:16:4 + │ + 16│ } else { + + │ ^^^^ + + 80) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:3 + │ + 16│ } else { + + │ ^ + + 81) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:16:2 + │ + 16│ } else { + + │ ^ + + 82) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:0 + │ + 16│ } else { + + │ ^^ + + 83) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:15:11 + + 84) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:15:10 + │ + 15│ raise() + + │ ^ + + 85) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:15:9 + │ + 15│ raise() + + │ ^ + + 86) Unexpected token "raise" at test/fixtures/fixtures/canonical/effects.lys:15:4 + │ + 15│ raise() + + │ ^^^^^ + + 87) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:15:0 + │ + 15│ raise() + + │ ^^^^ + + 88) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:14:15 + + 89) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:14:14 + │ + 14│ if (b == 0) { + + │ ^ + + 90) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:13 + │ + 14│ if (b == 0) { + + │ ^ + + 91) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:14:12 + │ + 14│ if (b == 0) { + + │ ^ + + 92) Unexpected token "0" at test/fixtures/fixtures/canonical/effects.lys:14:11 + │ + 14│ if (b == 0) { + + │ ^ + + 93) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:10 + │ + 14│ if (b == 0) { + + │ ^ + + 94) Unexpected token "==" at test/fixtures/fixtures/canonical/effects.lys:14:8 + │ + 14│ if (b == 0) { + + │ ^^ + + 95) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:7 + │ + 14│ if (b == 0) { + + │ ^ + + 96) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:14:6 + │ + 14│ if (b == 0) { + + │ ^ + + 97) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:14:5 + │ + 14│ if (b == 0) { + + │ ^ + + 98) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:4 + │ + 14│ if (b == 0) { + + │ ^ + + 99) Unexpected token "if" at test/fixtures/fixtures/canonical/effects.lys:14:2 + │ + 14│ if (b == 0) { + + │ ^^ + + 100) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:0 + │ + 14│ if (b == 0) { + + │ ^^ + + 101) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:13:41 + + 102) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:13:40 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 103) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:39 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 104) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:13:38 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 105) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:37 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 106) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:36 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 107) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:35 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 108) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:13:34 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 109) Unexpected token "_" at test/fixtures/fixtures/canonical/effects.lys:13:33 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 110) Unexpected token "|" at test/fixtures/fixtures/canonical/effects.lys:13:32 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 111) Unexpected token "exn" at test/fixtures/fixtures/canonical/effects.lys:13:29 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^^^ + + 112) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:13:28 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 113) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:27 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 114) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:26 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 115) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:13:25 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 116) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:24 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 117) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:23 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 118) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:22 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 119) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:13:21 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 120) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:20 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 121) Unexpected token "," at test/fixtures/fixtures/canonical/effects.lys:13:19 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 122) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:18 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 123) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:17 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 124) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:16 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 125) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:13:15 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 126) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:13:14 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 127) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:13:13 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 128) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:12 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 129) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:13:11 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 130) Unexpected token "safeDiv" at test/fixtures/fixtures/canonical/effects.lys:13:4 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^^^^^^^ + + 131) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:3 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^ + + 132) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:13:0 + │ + 13│ fun safeDiv(a: T, b: T): T = { + + │ ^^^ + + 133) Unexpected token " + +" at test/fixtures/fixtures/canonical/effects.lys:11:28 + + 134) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:27 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 135) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:26 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 136) Unexpected token "*" at test/fixtures/fixtures/canonical/effects.lys:11:25 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 137) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:24 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 138) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:23 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 139) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:22 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 140) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:11:21 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 141) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:20 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 142) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:11:17 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^^^ + + 143) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:16 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 144) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:11:15 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 145) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:11:14 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 146) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:11:11 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^^^ + + 147) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:10 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 148) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:11:9 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 149) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:8 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 150) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:11:7 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 151) Unexpected token "sqr" at test/fixtures/fixtures/canonical/effects.lys:11:4 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^^^ + + 152) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:3 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^ + + 153) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:11:0 + │ + 11│ fun sqr(x: i32): i32 = x * x + + │ ^^^ + + 154) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:10:31 + + 155) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:10:30 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 156) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:29 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 157) Unexpected token "*" at test/fixtures/fixtures/canonical/effects.lys:10:28 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 158) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:27 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 159) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:10:26 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 160) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:25 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 161) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:10:24 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 162) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:23 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 163) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:10:20 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^^^ + + 164) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:19 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + + 165) Unexpected token "<>" at test/fixtures/fixtures/canonical/effects.lys:10:17 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^^ + + 166) A type or effect was expected at test/fixtures/fixtures/canonical/effects.lys:10:16 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ + diff --git a/test/fixtures/fixtures/canonical/embededWast.lys b/test/fixtures/fixtures/canonical/embededWast.lys index b24a9da..b7c98a8 100644 --- a/test/fixtures/fixtures/canonical/embededWast.lys +++ b/test/fixtures/fixtures/canonical/embededWast.lys @@ -6,7 +6,7 @@ private fun test(): void = %wasm { #[inline] private fun test(): void = %wasm { } #[inline] -private fun test(): void =%wasm{} +private fun test(): void = %wasm{} var freeblock = 0 diff --git a/test/fixtures/fixtures/canonical/embededWast.lys.ast b/test/fixtures/fixtures/canonical/embededWast.lys.ast index 43126e9..8e4978f 100644 --- a/test/fixtures/fixtures/canonical/embededWast.lys.ast +++ b/test/fixtures/fixtures/canonical/embededWast.lys.ast @@ -1,4 +1,4 @@ -|-Document(0,1174) +|-Document(0,1175) |-FunctionDirective(0,49) |-Decorators(0,10) |-Decorator(0,10) @@ -49,14 +49,14 @@ |-FunctionBody(84,96) |-WasmExpression(86,96) - |-FunctionDirective(96,131) + |-FunctionDirective(96,142) |-Decorators(96,106) |-Decorator(96,106) |-NameIdentifier(98,104) |-Identifier=inline |-PrivateModifier(106,114) - |-FunDeclaration(114,131) + |-FunDeclaration(114,142) |-FunctionName(118,122) |-NameIdentifier(118,122) |-Identifier=test @@ -71,437 +71,317 @@ |-QName(126,130) |-NameIdentifier(126,130) |-Identifier=void - |-FunctionBody(131,131) + |-FunctionBody(131,142) + |-WasmExpression(133,142) + + |-VarDirective(142,159) + |-VarDeclaration(142,159) + |-NameIdentifier(146,155) + |-Identifier=freeblock + |-NumberLiteral=0 + |-FunctionDirective(161,396) + |-Decorators(161,161) + + |-FunDeclaration(161,396) + |-FunctionName(165,171) + |-NameIdentifier(165,171) + |-Identifier=malloc + |-TypeParameters(171,171) + + |-FunctionParamsList(171,182) + |-(List)(172,181) + |-Parameter(172,181) + |-NameIdentifier(172,176) + |-Identifier=size + |-Type(178,181) + |-Reference(178,181) + |-QName(178,181) + |-NameIdentifier(178,181) + |-Identifier=i32 + |-ReturnType(182,188) + |-Type(184,187) + |-Reference(184,187) + |-QName(184,187) + |-NameIdentifier(184,187) + |-Identifier=i32 + |-FunctionBody(188,396) + |-WasmExpression(190,396) + |-SExpression(200,223) + |-SSymbol(201,206) + |-Identifier=local + |-QName(207,215) + |-NameIdentifier(207,215) + |-Identifier=$address + |-QName(216,219) + |-NameIdentifier(216,219) + |-Identifier=i32 + |-SExpression(223,269) + |-SSymbol(224,233) + |-Identifier=set_local + |-QName(234,242) + |-NameIdentifier(234,242) + |-Identifier=$address + |-SExpression(243,265) + |-SSymbol(244,254) + |-Identifier=get_global + |-QName(255,264) + |-NameIdentifier(255,264) + |-Identifier=freeblock + |-SExpression(269,372) + |-SSymbol(270,280) + |-Identifier=set_global + |-QName(285,295) + |-NameIdentifier(285,295) + |-Identifier=$freeblock + |-SExpression(300,368) + |-SSymbol(301,308) + |-Identifier=i32 + |-Operator=. + |-Identifier=add + |-SExpression(315,342) + |-SSymbol(316,325) + |-Identifier=get_local + |-QName(326,334) + |-NameIdentifier(326,334) + |-Identifier=$address + |-SExpression(342,364) + |-SSymbol(343,352) + |-Identifier=get_local + |-QName(353,358) + |-NameIdentifier(353,358) + |-Identifier=$size + |-SExpression(372,393) + |-SSymbol(373,382) + |-Identifier=get_local + |-QName(383,391) + |-NameIdentifier(383,391) + |-Identifier=$address + |-FunctionDirective(396,1175) + |-Decorators(396,396) + + |-FunDeclaration(396,1175) + |-FunctionName(400,406) + |-NameIdentifier(400,406) + |-Identifier=strAdd + |-TypeParameters(406,406) - |-==% - |-=wasm - |-={ - |-=} - |-= - - - |-=var - |-= - |-=freeblock - |-= - |-== - |-= - |-=0 - |-= - - - |-=fun - |-= - |-=malloc - |-=( - |-=size - |-=: - |-= - |-=i32 - |-=) - |-=: - |-= - |-=i32 - |-= - |-== - |-= - |-=% - |-=wasm - |-= - |-={ - |-= - - |-= - |-=( - |-=local - |-= - |-=$address - |-= - |-=i32 - |-=) - |-= - - |-= - |-=( - |-=set_local - |-= - |-=$address - |-= - |-=( - |-=get_global - |-= - |-=freeblock - |-=) - |-=) - |-= - - |-= - |-=( - |-=set_global - |-= - - |-= - |-=$freeblock - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=add - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$address - |-=) - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$size - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$address - |-=) - |-= - - |-=} - |-= - - - |-=fun - |-= - |-=strAdd - |-=( - |-=a - |-=: - |-= - |-=i32 - |-=, - |-= - |-=b - |-=: - |-= - |-=i32 - |-=) - |-=: - |-= - |-=i32 - |-= - |-== - |-= - |-=% - |-=wasm - |-= - |-={ - |-= - - |-= - |-=( - |-=local - |-= - |-=$sum - |-= - |-=i32 - |-=) - |-= - - |-= - |-=( - |-=local - |-= - |-=$aSize - |-= - |-=i32 - |-=) - |-= - - |-= - |-=( - |-=local - |-= - |-=$newStr - |-= - |-=i32 - |-=) - |-= - - |-= - |-=( - |-=return - |-= - - |-= - |-=( - |-=set_local - |-= - |-=$aSize - |-= - |-=( - |-=i32 - |-=. - |-=load8_u - |-= - |-=a - |-=) - |-=) - |-= - - |-= - |-=( - |-=set_local - |-= - |-=$sum - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=sub - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=add - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$aSize - |-=) - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=load8_u - |-= - |-=b - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=const - |-= - |-=1 - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=set_local - |-= - |-=$newStr - |-= - - |-= - |-=( - |-=call - |-= - |-=malloc - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=add - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$sum - |-=) - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=const - |-= - |-=1 - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=store8 - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$newStr - |-=) - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$sum - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=call - |-= - |-=string_copy - |-= - |-=( - |-=get_local - |-= - |-=$a - |-=) - |-= - |-=( - |-=get_local - |-= - |-=$newStr - |-=) - |-=) - |-= - - |-= - |-=( - |-=call - |-= - |-=string_copy - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$b - |-=) - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=sub - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=add - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$newStr - |-=) - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$aSize - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=i32 - |-=. - |-=const - |-= - |-=1 - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=) - |-= - - |-= - |-=( - |-=get_local - |-= - |-=$newStr - |-=) - |-= - - |-= - |-=) - |-= - - |-=} - |-= + |-FunctionParamsList(406,422) + |-(List)(407,421) + |-Parameter(407,413) + |-NameIdentifier(407,408) + |-Identifier=a + |-Type(410,413) + |-Reference(410,413) + |-QName(410,413) + |-NameIdentifier(410,413) + |-Identifier=i32 + |-Parameter(415,421) + |-NameIdentifier(415,416) + |-Identifier=b + |-Type(418,421) + |-Reference(418,421) + |-QName(418,421) + |-NameIdentifier(418,421) + |-Identifier=i32 + |-ReturnType(422,428) + |-Type(424,427) + |-Reference(424,427) + |-QName(424,427) + |-NameIdentifier(424,427) + |-Identifier=i32 + |-FunctionBody(428,1175) + |-WasmExpression(430,1175) + |-SExpression(440,459) + |-SSymbol(441,446) + |-Identifier=local + |-QName(447,451) + |-NameIdentifier(447,451) + |-Identifier=$sum + |-QName(452,455) + |-NameIdentifier(452,455) + |-Identifier=i32 + |-SExpression(459,480) + |-SSymbol(460,465) + |-Identifier=local + |-QName(466,472) + |-NameIdentifier(466,472) + |-Identifier=$aSize + |-QName(473,476) + |-NameIdentifier(473,476) + |-Identifier=i32 + |-SExpression(480,502) + |-SSymbol(481,486) + |-Identifier=local + |-QName(487,494) + |-NameIdentifier(487,494) + |-Identifier=$newStr + |-QName(495,498) + |-NameIdentifier(495,498) + |-Identifier=i32 + |-SExpression(502,1173) + |-SSymbol(503,509) + |-Identifier=return + |-SExpression(514,553) + |-SSymbol(515,524) + |-Identifier=set_local + |-QName(525,531) + |-NameIdentifier(525,531) + |-Identifier=$aSize + |-SExpression(532,547) + |-SSymbol(533,544) + |-Identifier=i32 + |-Operator=. + |-Identifier=load8_u + |-QName(545,546) + |-NameIdentifier(545,546) + |-Identifier=a + |-SExpression(553,706) + |-SSymbol(554,563) + |-Identifier=set_local + |-QName(564,568) + |-NameIdentifier(564,568) + |-Identifier=$sum + |-SExpression(575,700) + |-SSymbol(576,583) + |-Identifier=i32 + |-Operator=. + |-Identifier=sub + |-SExpression(592,674) + |-SSymbol(593,600) + |-Identifier=i32 + |-Operator=. + |-Identifier=add + |-SExpression(611,640) + |-SSymbol(612,621) + |-Identifier=get_local + |-QName(622,628) + |-NameIdentifier(622,628) + |-Identifier=$aSize + |-SExpression(640,664) + |-SSymbol(641,652) + |-Identifier=i32 + |-Operator=. + |-Identifier=load8_u + |-QName(653,654) + |-NameIdentifier(653,654) + |-Identifier=b + |-SExpression(674,694) + |-SSymbol(675,684) + |-Identifier=i32 + |-Operator=. + |-Keyword=const + |-NegNumberLiteral(685,686) + |-NumberLiteral=1 + |-SExpression(706,840) + |-SSymbol(707,716) + |-Identifier=set_local + |-QName(717,724) + |-NameIdentifier(717,724) + |-Identifier=$newStr + |-SExpression(731,834) + |-SSymbol(732,736) + |-Identifier=call + |-QName(737,743) + |-NameIdentifier(737,743) + |-Identifier=malloc + |-SExpression(752,828) + |-SSymbol(753,760) + |-Identifier=i32 + |-Operator=. + |-Identifier=add + |-SExpression(771,798) + |-SSymbol(772,781) + |-Identifier=get_local + |-QName(782,786) + |-NameIdentifier(782,786) + |-Identifier=$sum + |-SExpression(798,820) + |-SSymbol(799,808) + |-Identifier=i32 + |-Operator=. + |-Keyword=const + |-NegNumberLiteral(809,810) + |-NumberLiteral=1 + |-SExpression(840,911) + |-SSymbol(841,851) + |-Identifier=i32 + |-Operator=. + |-Identifier=store8 + |-SExpression(858,884) + |-SSymbol(859,868) + |-Identifier=get_local + |-QName(869,876) + |-NameIdentifier(869,876) + |-Identifier=$newStr + |-SExpression(884,905) + |-SSymbol(885,894) + |-Identifier=get_local + |-QName(895,899) + |-NameIdentifier(895,899) + |-Identifier=$sum + |-SExpression(911,969) + |-SSymbol(912,916) + |-Identifier=call + |-QName(917,928) + |-NameIdentifier(917,928) + |-Identifier=string_copy + |-SExpression(929,944) + |-SSymbol(930,939) + |-Identifier=get_local + |-QName(940,942) + |-NameIdentifier(940,942) + |-Identifier=$a + |-SExpression(944,963) + |-SSymbol(945,954) + |-Identifier=get_local + |-QName(955,962) + |-NameIdentifier(955,962) + |-Identifier=$newStr + |-SExpression(969,1149) + |-SSymbol(970,974) + |-Identifier=call + |-QName(975,986) + |-NameIdentifier(975,986) + |-Identifier=string_copy + |-SExpression(993,1014) + |-SSymbol(994,1003) + |-Identifier=get_local + |-QName(1004,1006) + |-NameIdentifier(1004,1006) + |-Identifier=$b + |-SExpression(1014,1143) + |-SSymbol(1015,1022) + |-Identifier=i32 + |-Operator=. + |-Identifier=sub + |-SExpression(1031,1117) + |-SSymbol(1032,1039) + |-Identifier=i32 + |-Operator=. + |-Identifier=add + |-SExpression(1050,1080) + |-SSymbol(1051,1060) + |-Identifier=get_local + |-QName(1061,1068) + |-NameIdentifier(1061,1068) + |-Identifier=$newStr + |-SExpression(1080,1107) + |-SSymbol(1081,1090) + |-Identifier=get_local + |-QName(1091,1097) + |-NameIdentifier(1091,1097) + |-Identifier=$aSize + |-SExpression(1117,1137) + |-SSymbol(1118,1127) + |-Identifier=i32 + |-Operator=. + |-Keyword=const + |-NegNumberLiteral(1128,1129) + |-NumberLiteral=1 + |-SExpression(1149,1171) + |-SSymbol(1150,1159) + |-Identifier=get_local + |-QName(1160,1167) + |-NameIdentifier(1160,1167) + |-Identifier=$newStr + |-EndOfFile= \ No newline at end of file diff --git a/test/fixtures/fixtures/canonical/embededWast.lys.lys.ast-2 b/test/fixtures/fixtures/canonical/embededWast.lys.lys.ast-2 index 7c11e15..47c964b 100644 --- a/test/fixtures/fixtures/canonical/embededWast.lys.lys.ast-2 +++ b/test/fixtures/fixtures/canonical/embededWast.lys.lys.ast-2 @@ -36,4 +36,147 @@ |-ReferenceNode |-QNameNode |-NameIdentifierNode name=void + |-WasmExpressionNode + |-EmptyNode + |-VarDirectiveNode + |-VarDeclarationNode + |-NameIdentifierNode name=freeblock |-EmptyNode + |-FloatLiteralNode value=0 + |-FunDirectiveNode + |-EmptyNode + |-FunctionNode + |-NameIdentifierNode name=malloc + |-ParameterNode + |-NameIdentifierNode name=size + |-ReferenceNode + |-QNameNode + |-NameIdentifierNode name=i32 + |-ReferenceNode + |-QNameNode + |-NameIdentifierNode name=i32 + |-WasmExpressionNode + |-WasmAtomNode symbol=local + |-QNameNode + |-NameIdentifierNode name=$address + |-QNameNode + |-NameIdentifierNode name=i32 + |-WasmAtomNode symbol=set_local + |-QNameNode + |-NameIdentifierNode name=$address + |-WasmAtomNode symbol=get_global + |-QNameNode + |-NameIdentifierNode name=freeblock + |-WasmAtomNode symbol=set_global + |-QNameNode + |-NameIdentifierNode name=$freeblock + |-WasmAtomNode symbol=i32.add + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$address + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$size + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$address + |-FunDirectiveNode + |-EmptyNode + |-FunctionNode + |-NameIdentifierNode name=strAdd + |-ParameterNode + |-NameIdentifierNode name=a + |-ReferenceNode + |-QNameNode + |-NameIdentifierNode name=i32 + |-ParameterNode + |-NameIdentifierNode name=b + |-ReferenceNode + |-QNameNode + |-NameIdentifierNode name=i32 + |-ReferenceNode + |-QNameNode + |-NameIdentifierNode name=i32 + |-WasmExpressionNode + |-WasmAtomNode symbol=local + |-QNameNode + |-NameIdentifierNode name=$sum + |-QNameNode + |-NameIdentifierNode name=i32 + |-WasmAtomNode symbol=local + |-QNameNode + |-NameIdentifierNode name=$aSize + |-QNameNode + |-NameIdentifierNode name=i32 + |-WasmAtomNode symbol=local + |-QNameNode + |-NameIdentifierNode name=$newStr + |-QNameNode + |-NameIdentifierNode name=i32 + |-WasmAtomNode symbol=return + |-WasmAtomNode symbol=set_local + |-QNameNode + |-NameIdentifierNode name=$aSize + |-WasmAtomNode symbol=i32.load8_u + |-QNameNode + |-NameIdentifierNode name=a + |-WasmAtomNode symbol=set_local + |-QNameNode + |-NameIdentifierNode name=$sum + |-WasmAtomNode symbol=i32.sub + |-WasmAtomNode symbol=i32.add + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$aSize + |-WasmAtomNode symbol=i32.load8_u + |-QNameNode + |-NameIdentifierNode name=b + |-WasmAtomNode symbol=i32.const + |-FloatLiteralNode value=1 + |-WasmAtomNode symbol=set_local + |-QNameNode + |-NameIdentifierNode name=$newStr + |-WasmAtomNode symbol=call + |-QNameNode + |-NameIdentifierNode name=malloc + |-WasmAtomNode symbol=i32.add + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$sum + |-WasmAtomNode symbol=i32.const + |-FloatLiteralNode value=1 + |-WasmAtomNode symbol=i32.store8 + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$newStr + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$sum + |-WasmAtomNode symbol=call + |-QNameNode + |-NameIdentifierNode name=string_copy + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$a + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$newStr + |-WasmAtomNode symbol=call + |-QNameNode + |-NameIdentifierNode name=string_copy + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$b + |-WasmAtomNode symbol=i32.sub + |-WasmAtomNode symbol=i32.add + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$newStr + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$aSize + |-WasmAtomNode symbol=i32.const + |-FloatLiteralNode value=1 + |-WasmAtomNode symbol=get_local + |-QNameNode + |-NameIdentifierNode name=$newStr diff --git a/test/fixtures/fixtures/canonical/embededWast.lys.result b/test/fixtures/fixtures/canonical/embededWast.lys.result index 8a7bad5..20fb872 100644 --- a/test/fixtures/fixtures/canonical/embededWast.lys.result +++ b/test/fixtures/fixtures/canonical/embededWast.lys.result @@ -61,7 +61,9 @@ "Whitespace( )" "Identifier(void)" "Whitespace( )" -"Operator(=%)" +"Operator(=)" +"Whitespace( )" +"Operator(%)" "Identifier(wasm)" "CurlyBracesOpen({)" "CurlyBracesClose(})" diff --git a/test/fixtures/fixtures/canonical/embededWast.lys.syntax-error b/test/fixtures/fixtures/canonical/embededWast.lys.syntax-error deleted file mode 100644 index 9566714..0000000 --- a/test/fixtures/fixtures/canonical/embededWast.lys.syntax-error +++ /dev/null @@ -1,433 +0,0 @@ -1) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -2) Unexpected token `}` at test/fixtures/fixtures/canonical/embededWast.lys -3) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -4) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -5) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -6) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -7) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -8) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys -9) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -10) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -11) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -12) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -13) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -14) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -15) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -16) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -17) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -18) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -19) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -20) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -21) Unexpected token `1` at test/fixtures/fixtures/canonical/embededWast.lys -22) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -23) Unexpected token `const` at test/fixtures/fixtures/canonical/embededWast.lys -24) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -25) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -26) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -27) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -28) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -29) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -30) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -31) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -32) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -33) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys -34) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -35) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -36) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -37) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -38) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -39) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -40) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys -41) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -42) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -43) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -44) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -45) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -46) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys -47) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -48) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -49) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -50) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -51) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -52) Unexpected token `sub` at test/fixtures/fixtures/canonical/embededWast.lys -53) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -54) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -55) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -56) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -57) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -58) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -59) Unexpected token `$b` at test/fixtures/fixtures/canonical/embededWast.lys -60) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -61) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -62) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -63) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -64) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -65) Unexpected token `string_copy` at test/fixtures/fixtures/canonical/embededWast.lys -66) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -67) Unexpected token `call` at test/fixtures/fixtures/canonical/embededWast.lys -68) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -69) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -70) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -71) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -72) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -73) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys -74) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -75) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -76) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -77) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -78) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -79) Unexpected token `$a` at test/fixtures/fixtures/canonical/embededWast.lys -80) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -81) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -82) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -83) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -84) Unexpected token `string_copy` at test/fixtures/fixtures/canonical/embededWast.lys -85) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -86) Unexpected token `call` at test/fixtures/fixtures/canonical/embededWast.lys -87) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -88) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -89) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -90) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -91) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -92) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -93) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -94) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys -95) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -96) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -97) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -98) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -99) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -100) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -101) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys -102) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -103) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -104) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -105) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -106) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -107) Unexpected token `store8` at test/fixtures/fixtures/canonical/embededWast.lys -108) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -109) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -110) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -111) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -112) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -113) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -114) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -115) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -116) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -117) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -118) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -119) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -120) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -121) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -122) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -123) Unexpected token `1` at test/fixtures/fixtures/canonical/embededWast.lys -124) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -125) Unexpected token `const` at test/fixtures/fixtures/canonical/embededWast.lys -126) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -127) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -128) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -129) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -130) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -131) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -132) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys -133) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -134) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -135) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -136) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -137) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -138) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys -139) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -140) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -141) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -142) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -143) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -144) Unexpected token `malloc` at test/fixtures/fixtures/canonical/embededWast.lys -145) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -146) Unexpected token `call` at test/fixtures/fixtures/canonical/embededWast.lys -147) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -148) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -149) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -150) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys -151) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -152) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys -153) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -154) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -155) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -156) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -157) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -158) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -159) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -160) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -161) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -162) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -163) Unexpected token `1` at test/fixtures/fixtures/canonical/embededWast.lys -164) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -165) Unexpected token `const` at test/fixtures/fixtures/canonical/embededWast.lys -166) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -167) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -168) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -169) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -170) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -171) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -172) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -173) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -174) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -175) Unexpected token `b` at test/fixtures/fixtures/canonical/embededWast.lys -176) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -177) Unexpected token `load8_u` at test/fixtures/fixtures/canonical/embededWast.lys -178) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -179) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -180) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -181) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -182) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -183) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -184) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys -185) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -186) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -187) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -188) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -189) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -190) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys -191) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -192) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -193) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -194) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -195) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -196) Unexpected token `sub` at test/fixtures/fixtures/canonical/embededWast.lys -197) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -198) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -199) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -200) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -201) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -202) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys -203) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -204) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys -205) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -206) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -207) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -208) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -209) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -210) Unexpected token `a` at test/fixtures/fixtures/canonical/embededWast.lys -211) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -212) Unexpected token `load8_u` at test/fixtures/fixtures/canonical/embededWast.lys -213) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -214) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -215) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -216) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -217) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys -218) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -219) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys -220) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -221) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -222) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -223) Unexpected token `return` at test/fixtures/fixtures/canonical/embededWast.lys -224) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -225) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -226) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -227) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -228) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -229) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -230) Unexpected token `$newStr` at test/fixtures/fixtures/canonical/embededWast.lys -231) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -232) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys -233) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -234) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -235) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -236) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -237) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -238) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -239) Unexpected token `$aSize` at test/fixtures/fixtures/canonical/embededWast.lys -240) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -241) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys -242) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -243) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -244) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -245) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -246) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -247) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -248) Unexpected token `$sum` at test/fixtures/fixtures/canonical/embededWast.lys -249) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -250) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys -251) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -252) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -253) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -254) Unexpected token `{` at test/fixtures/fixtures/canonical/embededWast.lys -255) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -256) Unexpected token `wasm` at test/fixtures/fixtures/canonical/embededWast.lys -257) Unexpected token `%` at test/fixtures/fixtures/canonical/embededWast.lys -258) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -259) Unexpected token `=` at test/fixtures/fixtures/canonical/embededWast.lys -260) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -261) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -262) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -263) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys -264) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -265) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -266) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -267) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys -268) Unexpected token `b` at test/fixtures/fixtures/canonical/embededWast.lys -269) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -270) Unexpected token `,` at test/fixtures/fixtures/canonical/embededWast.lys -271) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -272) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -273) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys -274) Unexpected token `a` at test/fixtures/fixtures/canonical/embededWast.lys -275) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -276) Unexpected token `strAdd` at test/fixtures/fixtures/canonical/embededWast.lys -277) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -278) Unexpected token `fun` at test/fixtures/fixtures/canonical/embededWast.lys -279) Unexpected token ` - -` at test/fixtures/fixtures/canonical/embededWast.lys -280) Unexpected token `}` at test/fixtures/fixtures/canonical/embededWast.lys -281) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -282) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -283) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys -284) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -285) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -286) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -287) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -288) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -289) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -290) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -291) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -292) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -293) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -294) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -295) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -296) Unexpected token `$size` at test/fixtures/fixtures/canonical/embededWast.lys -297) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -298) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -299) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -300) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -301) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -302) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -303) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys -304) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -305) Unexpected token `get_local` at test/fixtures/fixtures/canonical/embededWast.lys -306) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -307) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -308) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -309) Unexpected token `add` at test/fixtures/fixtures/canonical/embededWast.lys -310) Unexpected token `.` at test/fixtures/fixtures/canonical/embededWast.lys -311) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -312) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -313) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -314) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -315) Unexpected token `$freeblock` at test/fixtures/fixtures/canonical/embededWast.lys -316) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -317) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -318) Unexpected token `set_global` at test/fixtures/fixtures/canonical/embededWast.lys -319) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -320) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -321) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -322) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -323) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -324) Unexpected token `freeblock` at test/fixtures/fixtures/canonical/embededWast.lys -325) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -326) Unexpected token `get_global` at test/fixtures/fixtures/canonical/embededWast.lys -327) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -328) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -329) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys -330) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -331) Unexpected token `set_local` at test/fixtures/fixtures/canonical/embededWast.lys -332) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -333) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -334) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -335) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -336) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -337) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -338) Unexpected token `$address` at test/fixtures/fixtures/canonical/embededWast.lys -339) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -340) Unexpected token `local` at test/fixtures/fixtures/canonical/embededWast.lys -341) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -342) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -343) Unexpected token ` -` at test/fixtures/fixtures/canonical/embededWast.lys -344) Unexpected token `{` at test/fixtures/fixtures/canonical/embededWast.lys -345) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -346) Unexpected token `wasm` at test/fixtures/fixtures/canonical/embededWast.lys -347) Unexpected token `%` at test/fixtures/fixtures/canonical/embededWast.lys -348) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -349) Unexpected token `=` at test/fixtures/fixtures/canonical/embededWast.lys -350) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -351) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -352) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -353) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys -354) Unexpected token `)` at test/fixtures/fixtures/canonical/embededWast.lys -355) Unexpected token `i32` at test/fixtures/fixtures/canonical/embededWast.lys -356) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -357) Unexpected token `:` at test/fixtures/fixtures/canonical/embededWast.lys -358) Unexpected token `size` at test/fixtures/fixtures/canonical/embededWast.lys -359) Unexpected token `(` at test/fixtures/fixtures/canonical/embededWast.lys -360) Unexpected token `malloc` at test/fixtures/fixtures/canonical/embededWast.lys -361) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -362) Unexpected token `fun` at test/fixtures/fixtures/canonical/embededWast.lys -363) Unexpected token ` - -` at test/fixtures/fixtures/canonical/embededWast.lys -364) Unexpected token `0` at test/fixtures/fixtures/canonical/embededWast.lys -365) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -366) Unexpected token `=` at test/fixtures/fixtures/canonical/embededWast.lys -367) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -368) Unexpected token `freeblock` at test/fixtures/fixtures/canonical/embededWast.lys -369) Unexpected token ` ` at test/fixtures/fixtures/canonical/embededWast.lys -370) Unexpected token `var` at test/fixtures/fixtures/canonical/embededWast.lys -371) Unexpected token ` - -` at test/fixtures/fixtures/canonical/embededWast.lys -372) Unexpected token `}` at test/fixtures/fixtures/canonical/embededWast.lys -373) Unexpected token `{` at test/fixtures/fixtures/canonical/embededWast.lys -374) Unexpected token `wasm` at test/fixtures/fixtures/canonical/embededWast.lys -375) Unexpected token `=%` at test/fixtures/fixtures/canonical/embededWast.lys diff --git a/test/fixtures/fixtures/parser-error/a.lys.syntax-error b/test/fixtures/fixtures/parser-error/a.lys.syntax-error index cb91eec..b49af89 100644 --- a/test/fixtures/fixtures/parser-error/a.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/a.lys.syntax-error @@ -1 +1,5 @@ -1) A type or effect was expected at test/fixtures/fixtures/parser-error/a.lys + 1) A type or effect was expected at test/fixtures/fixtures/parser-error/a.lys:1:19 + │ + 1│ private fun test(a: ) = 2 + │ ^ + diff --git a/test/fixtures/fixtures/parser-error/b.lys.syntax-error b/test/fixtures/fixtures/parser-error/b.lys.syntax-error index 89a972f..119d0ae 100644 --- a/test/fixtures/fixtures/parser-error/b.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/b.lys.syntax-error @@ -1,9 +1,45 @@ -1) Unexpected token `1` at test/fixtures/fixtures/parser-error/b.lys -2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys -3) Unexpected token `=` at test/fixtures/fixtures/parser-error/b.lys -4) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys -5) Unexpected token `x` at test/fixtures/fixtures/parser-error/b.lys -6) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys -7) Unexpected token `val` at test/fixtures/fixtures/parser-error/b.lys -8) Unexpected token ` ` at test/fixtures/fixtures/parser-error/b.lys -9) Unexpected token `asd` at test/fixtures/fixtures/parser-error/b.lys + 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/b.lys:1:34 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:33 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 3) Unexpected token "=" at test/fixtures/fixtures/parser-error/b.lys:1:32 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 4) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:31 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 5) Unexpected token "x" at test/fixtures/fixtures/parser-error/b.lys:1:30 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 6) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:29 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 7) Unexpected token "val" at test/fixtures/fixtures/parser-error/b.lys:1:26 + │ + 1│ private struct Entity asd val x = 1 + │ ^^^ + + 8) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:25 + │ + 1│ private struct Entity asd val x = 1 + │ ^ + + 9) Unexpected token "asd" at test/fixtures/fixtures/parser-error/b.lys:1:22 + │ + 1│ private struct Entity asd val x = 1 + │ ^^^ + diff --git a/test/fixtures/fixtures/parser-error/c.lys.syntax-error b/test/fixtures/fixtures/parser-error/c.lys.syntax-error index cbdfe00..310a571 100644 --- a/test/fixtures/fixtures/parser-error/c.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/c.lys.syntax-error @@ -1 +1,5 @@ -1) Unexpected token `asd` at test/fixtures/fixtures/parser-error/c.lys + 1) Unexpected token "asd" at test/fixtures/fixtures/parser-error/c.lys:1:22 + │ + 1│ private struct Entity asd + │ ^^^ + diff --git a/test/fixtures/fixtures/parser-error/d.lys.syntax-error b/test/fixtures/fixtures/parser-error/d.lys.syntax-error index 2e595bd..5a7c80c 100644 --- a/test/fixtures/fixtures/parser-error/d.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/d.lys.syntax-error @@ -1,9 +1,45 @@ -1) Unexpected token `1` at test/fixtures/fixtures/parser-error/d.lys -2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys -3) Unexpected token `=` at test/fixtures/fixtures/parser-error/d.lys -4) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys -5) Unexpected token `x` at test/fixtures/fixtures/parser-error/d.lys -6) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys -7) Unexpected token `val` at test/fixtures/fixtures/parser-error/d.lys -8) Unexpected token ` ` at test/fixtures/fixtures/parser-error/d.lys -9) Unexpected token `asd` at test/fixtures/fixtures/parser-error/d.lys + 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/d.lys:1:26 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:25 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 3) Unexpected token "=" at test/fixtures/fixtures/parser-error/d.lys:1:24 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 4) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:23 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 5) Unexpected token "x" at test/fixtures/fixtures/parser-error/d.lys:1:22 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 6) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:21 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 7) Unexpected token "val" at test/fixtures/fixtures/parser-error/d.lys:1:18 + │ + 1│ struct Entity asd val x = 1 + │ ^^^ + + 8) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:17 + │ + 1│ struct Entity asd val x = 1 + │ ^ + + 9) Unexpected token "asd" at test/fixtures/fixtures/parser-error/d.lys:1:14 + │ + 1│ struct Entity asd val x = 1 + │ ^^^ + diff --git a/test/fixtures/fixtures/parser-error/e.lys.syntax-error b/test/fixtures/fixtures/parser-error/e.lys.syntax-error index e45b262..92637da 100644 --- a/test/fixtures/fixtures/parser-error/e.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/e.lys.syntax-error @@ -1 +1,5 @@ -1) Unexpected token `asd` at test/fixtures/fixtures/parser-error/e.lys + 1) Unexpected token "asd" at test/fixtures/fixtures/parser-error/e.lys:1:14 + │ + 1│ struct Entity asd + │ ^^^ + diff --git a/test/fixtures/fixtures/parser-error/f.lys.syntax-error b/test/fixtures/fixtures/parser-error/f.lys.syntax-error index fe9cfd7..95b2667 100644 --- a/test/fixtures/fixtures/parser-error/f.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/f.lys.syntax-error @@ -1 +1,5 @@ -1) A type or effect was expected at test/fixtures/fixtures/parser-error/f.lys + 1) A type or effect was expected at test/fixtures/fixtures/parser-error/f.lys:1:19 + │ + 1│ private fun test(a: ,b: AType) = 2 + │ ^ + diff --git a/test/fixtures/fixtures/parser-error/h.lys.syntax-error b/test/fixtures/fixtures/parser-error/h.lys.syntax-error index b1bb290..a301727 100644 --- a/test/fixtures/fixtures/parser-error/h.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/h.lys.syntax-error @@ -1,2 +1,10 @@ -1) Unexpected token `1` at test/fixtures/fixtures/parser-error/h.lys -2) A type or effect was expected at test/fixtures/fixtures/parser-error/h.lys + 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/h.lys:1:20 + │ + 1│ private fun test(a: 1) = 2 + │ ^ + + 2) A type or effect was expected at test/fixtures/fixtures/parser-error/h.lys:1:19 + │ + 1│ private fun test(a: 1) = 2 + │ ^ + diff --git a/test/fixtures/fixtures/parser-error/i.lys.syntax-error b/test/fixtures/fixtures/parser-error/i.lys.syntax-error index 57cf158..adb3e89 100644 --- a/test/fixtures/fixtures/parser-error/i.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/i.lys.syntax-error @@ -1 +1,5 @@ -1) A function name was expected at test/fixtures/fixtures/parser-error/i.lys + 1) A function name was expected at test/fixtures/fixtures/parser-error/i.lys:1:12 + │ + 1│ private fun () = 1 + │ ^ + diff --git a/test/fixtures/fixtures/parser-error/j.lys.syntax-error b/test/fixtures/fixtures/parser-error/j.lys.syntax-error index ceed3c0..3e0b63c 100644 --- a/test/fixtures/fixtures/parser-error/j.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/j.lys.syntax-error @@ -1,3 +1,15 @@ -1) Unexpected token `0` at test/fixtures/fixtures/parser-error/j.lys -2) Unexpected token `.` at test/fixtures/fixtures/parser-error/j.lys -3) A value was expected. at test/fixtures/fixtures/parser-error/j.lys + 1) Unexpected token "0" at test/fixtures/fixtures/parser-error/j.lys:1:9 + │ + 1│ var a = .0 + │ ^ + + 2) Unexpected token "." at test/fixtures/fixtures/parser-error/j.lys:1:8 + │ + 1│ var a = .0 + │ ^ + + 3) A value was expected. at test/fixtures/fixtures/parser-error/j.lys:1:8 + │ + 1│ var a = .0 + │ ^ + diff --git a/test/fixtures/fixtures/parser-error/k.lys.syntax-error b/test/fixtures/fixtures/parser-error/k.lys.syntax-error index f816779..dcd7e19 100644 --- a/test/fixtures/fixtures/parser-error/k.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/k.lys.syntax-error @@ -1,5 +1,25 @@ -1) Unexpected token `1` at test/fixtures/fixtures/parser-error/k.lys -2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/k.lys -3) Unexpected token `map` at test/fixtures/fixtures/parser-error/k.lys -4) Unexpected token ` ` at test/fixtures/fixtures/parser-error/k.lys -5) Unexpected token `else` at test/fixtures/fixtures/parser-error/k.lys + 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/k.lys:1:29 + │ + 1│ var a = match x { else } map 1 + │ ^ + + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/k.lys:1:28 + │ + 1│ var a = match x { else } map 1 + │ ^ + + 3) Unexpected token "map" at test/fixtures/fixtures/parser-error/k.lys:1:25 + │ + 1│ var a = match x { else } map 1 + │ ^^^ + + 4) Unexpected token " " at test/fixtures/fixtures/parser-error/k.lys:1:22 + │ + 1│ var a = match x { else } map 1 + │ ^ + + 5) Unexpected token "else" at test/fixtures/fixtures/parser-error/k.lys:1:18 + │ + 1│ var a = match x { else } map 1 + │ ^^^^ + diff --git a/test/fixtures/fixtures/parser-error/l.lys.syntax-error b/test/fixtures/fixtures/parser-error/l.lys.syntax-error index ef39014..946a396 100644 --- a/test/fixtures/fixtures/parser-error/l.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/l.lys.syntax-error @@ -1,4 +1,20 @@ -1) Unexpected token `1` at test/fixtures/fixtures/parser-error/l.lys -2) Unexpected token ` ` at test/fixtures/fixtures/parser-error/l.lys -3) Unexpected token `map` at test/fixtures/fixtures/parser-error/l.lys -4) An expression was expected at test/fixtures/fixtures/parser-error/l.lys + 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/l.lys:1:32 + │ + 1│ var a = match x { else -> } map 1 + │ ^ + + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/l.lys:1:31 + │ + 1│ var a = match x { else -> } map 1 + │ ^ + + 3) Unexpected token "map" at test/fixtures/fixtures/parser-error/l.lys:1:28 + │ + 1│ var a = match x { else -> } map 1 + │ ^^^ + + 4) An expression was expected at test/fixtures/fixtures/parser-error/l.lys:1:26 + │ + 1│ var a = match x { else -> } map 1 + │ ^ + diff --git a/test/fixtures/fixtures/parser-error/o.lys.syntax-error b/test/fixtures/fixtures/parser-error/o.lys.syntax-error index 53a8f8c..f4865ce 100644 --- a/test/fixtures/fixtures/parser-error/o.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/o.lys.syntax-error @@ -1,2 +1,10 @@ -1) Unexpected token `match` at test/fixtures/fixtures/parser-error/o.lys -2) A value was expected. at test/fixtures/fixtures/parser-error/o.lys + 1) Unexpected token "match" at test/fixtures/fixtures/parser-error/o.lys:1:8 + │ + 1│ var a = match + │ ^^^^^ + + 2) A value was expected. at test/fixtures/fixtures/parser-error/o.lys:1:8 + │ + 1│ var a = match + │ ^^^^^ + diff --git a/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error b/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error index 0e44b75..ffe5f04 100644 --- a/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error +++ b/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error @@ -1,6 +1,36 @@ -1) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys -2) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys -3) Unexpected token `f32` at test/fixtures/fixtures/sugar/enum-temperature.lys -4) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-temperature.lys -5) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-temperature.lys -6) Unexpected token `temperature` at test/fixtures/fixtures/sugar/enum-temperature.lys + 1) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys:14:28 + │ + 14│ Celcius.is(x) || Kelvin.is(x) + + │ ^^ + + 2) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys:14:12 + │ + 14│ Celcius.is(x) || Kelvin.is(x) + + │ ^^ + + 3) Unexpected token "f32" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:27 + │ + 2│ Celcius(mut temperature: f32) + + │ ^^^ + + 4) Unexpected token " " at test/fixtures/fixtures/sugar/enum-temperature.lys:2:26 + │ + 2│ Celcius(mut temperature: f32) + + │ ^ + + 5) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:25 + │ + 2│ Celcius(mut temperature: f32) + + │ ^ + + 6) Unexpected token "temperature" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:14 + │ + 2│ Celcius(mut temperature: f32) + + │ ^^^^^^^^^^^ + diff --git a/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error b/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error index 2cb6e2d..ecab8ca 100644 --- a/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error +++ b/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error @@ -1,517 +1,2724 @@ -1) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -2) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -3) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -4) Unexpected token `false` at test/fixtures/fixtures/sugar/enum-unary.lys -5) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -6) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -7) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -8) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys -9) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -10) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -11) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -12) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -13) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -14) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -15) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys -16) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -17) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -18) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -19) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -20) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -21) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys -22) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -23) Unexpected token `!=` at test/fixtures/fixtures/sugar/enum-unary.lys -24) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -25) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -26) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -27) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -28) Unexpected token `true` at test/fixtures/fixtures/sugar/enum-unary.lys -29) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -30) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -31) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -32) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys -33) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -34) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -35) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -36) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -37) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -38) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -39) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys -40) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -41) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -42) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -43) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -44) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -45) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys -46) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -47) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys -48) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -49) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -50) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -51) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -52) Unexpected token `staticInstance` at test/fixtures/fixtures/sugar/enum-unary.lys -53) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -54) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -55) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -56) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -57) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -58) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -59) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -60) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -61) Unexpected token `apply` at test/fixtures/fixtures/sugar/enum-unary.lys -62) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -63) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -64) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -65) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -66) Unexpected token `staticInstance` at test/fixtures/fixtures/sugar/enum-unary.lys -67) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -68) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys -69) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -70) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -71) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -72) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -73) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -74) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -75) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -76) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -77) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -78) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -79) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -80) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys -81) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -82) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -83) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -84) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -85) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys -86) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -87) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -88) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -89) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -90) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -91) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -92) Unexpected token `staticInstance` at test/fixtures/fixtures/sugar/enum-unary.lys -93) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -94) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -95) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -96) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -97) Unexpected token `2` at test/fixtures/fixtures/sugar/enum-unary.lys -98) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -99) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -100) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -101) Unexpected token `u32` at test/fixtures/fixtures/sugar/enum-unary.lys -102) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -103) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -104) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys -105) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -106) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -107) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -108) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -109) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -110) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -111) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -112) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -113) Unexpected token `impl` at test/fixtures/fixtures/sugar/enum-unary.lys -114) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -115) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -116) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -117) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -118) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -119) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -120) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -121) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys -122) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -123) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys -124) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -125) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys -126) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -127) Unexpected token `!` at test/fixtures/fixtures/sugar/enum-unary.lys -128) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -129) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -130) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -131) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -132) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -133) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -134) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys -135) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -136) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -137) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -138) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -139) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -140) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -141) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys -142) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -143) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -144) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -145) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -146) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -147) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys -148) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -149) Unexpected token `!=` at test/fixtures/fixtures/sugar/enum-unary.lys -150) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -151) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -152) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -153) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -154) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -155) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -156) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -157) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -158) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys -159) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -160) Unexpected token `get_value` at test/fixtures/fixtures/sugar/enum-unary.lys -161) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -162) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys -163) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -164) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -165) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys -166) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -167) Unexpected token `get_value` at test/fixtures/fixtures/sugar/enum-unary.lys -168) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -169) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -170) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -171) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -172) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -173) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -174) Unexpected token `boolean` at test/fixtures/fixtures/sugar/enum-unary.lys -175) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -176) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -177) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -178) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -179) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -180) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -181) Unexpected token `rhs` at test/fixtures/fixtures/sugar/enum-unary.lys -182) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -183) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -184) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -185) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -186) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -187) Unexpected token `lhs` at test/fixtures/fixtures/sugar/enum-unary.lys -188) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -189) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys -190) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -191) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -192) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -193) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -194) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -195) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -196) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -197) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -198) Unexpected token `newValue` at test/fixtures/fixtures/sugar/enum-unary.lys -199) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -200) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -201) Unexpected token `0` at test/fixtures/fixtures/sugar/enum-unary.lys -202) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -203) Unexpected token `+` at test/fixtures/fixtures/sugar/enum-unary.lys -204) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -205) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys -206) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -207) Unexpected token `store` at test/fixtures/fixtures/sugar/enum-unary.lys -208) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -209) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -210) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -211) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -212) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -213) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys -214) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -215) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys -216) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -217) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -218) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -219) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -220) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -221) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys -222) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -223) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -224) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -225) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -226) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -227) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -228) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -229) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -230) Unexpected token `void` at test/fixtures/fixtures/sugar/enum-unary.lys -231) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -232) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -233) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -234) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -235) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -236) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -237) Unexpected token `newValue` at test/fixtures/fixtures/sugar/enum-unary.lys -238) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -239) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -240) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -241) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -242) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -243) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys -244) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -245) Unexpected token `set_value` at test/fixtures/fixtures/sugar/enum-unary.lys -246) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -247) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -248) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -249) Unexpected token `private` at test/fixtures/fixtures/sugar/enum-unary.lys -250) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -251) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -252) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -253) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -254) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -255) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -256) Unexpected token `0` at test/fixtures/fixtures/sugar/enum-unary.lys -257) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -258) Unexpected token `+` at test/fixtures/fixtures/sugar/enum-unary.lys -259) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -260) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys -261) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -262) Unexpected token `read` at test/fixtures/fixtures/sugar/enum-unary.lys -263) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -264) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -265) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -266) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -267) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -268) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys -269) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -270) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys -271) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -272) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -273) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -274) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -275) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -276) Unexpected token `base` at test/fixtures/fixtures/sugar/enum-unary.lys -277) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -278) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -279) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -280) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -281) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -282) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -283) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -284) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -285) Unexpected token `f32` at test/fixtures/fixtures/sugar/enum-unary.lys -286) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -287) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -288) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -289) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -290) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -291) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -292) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys -293) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -294) Unexpected token `get_value` at test/fixtures/fixtures/sugar/enum-unary.lys -295) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -296) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -297) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -298) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -299) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -300) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -301) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -302) Unexpected token `Celcius` at test/fixtures/fixtures/sugar/enum-unary.lys -303) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -304) Unexpected token `as` at test/fixtures/fixtures/sugar/enum-unary.lys -305) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -306) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -307) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -308) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -309) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -310) Unexpected token `value` at test/fixtures/fixtures/sugar/enum-unary.lys -311) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -312) Unexpected token `,` at test/fixtures/fixtures/sugar/enum-unary.lys -313) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys -314) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -315) Unexpected token `set_value` at test/fixtures/fixtures/sugar/enum-unary.lys -316) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -317) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -318) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -319) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -320) Unexpected token `as` at test/fixtures/fixtures/sugar/enum-unary.lys -321) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -322) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -323) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -324) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys -325) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -326) Unexpected token `malloc` at test/fixtures/fixtures/sugar/enum-unary.lys -327) Unexpected token `::` at test/fixtures/fixtures/sugar/enum-unary.lys -328) Unexpected token `memory` at test/fixtures/fixtures/sugar/enum-unary.lys -329) Unexpected token `::` at test/fixtures/fixtures/sugar/enum-unary.lys -330) Unexpected token `core` at test/fixtures/fixtures/sugar/enum-unary.lys -331) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -332) Unexpected token `|` at test/fixtures/fixtures/sugar/enum-unary.lys -333) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -334) Unexpected token `32` at test/fixtures/fixtures/sugar/enum-unary.lys -335) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -336) Unexpected token `<<` at test/fixtures/fixtures/sugar/enum-unary.lys -337) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -338) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys -339) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -340) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -341) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -342) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -343) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -344) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -345) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -346) Unexpected token `ptr` at test/fixtures/fixtures/sugar/enum-unary.lys -347) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -348) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -349) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -350) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -351) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -352) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -353) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -354) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -355) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -356) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -357) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -358) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -359) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -360) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -361) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -362) Unexpected token `value` at test/fixtures/fixtures/sugar/enum-unary.lys -363) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -364) Unexpected token `apply` at test/fixtures/fixtures/sugar/enum-unary.lys -365) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -366) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -367) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -368) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -369) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys -370) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -371) Unexpected token `==` at test/fixtures/fixtures/sugar/enum-unary.lys -372) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -373) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys -374) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -375) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -376) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -377) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -378) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -379) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -380) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -381) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -382) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -383) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -384) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -385) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys -386) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -387) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -388) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -389) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -390) Unexpected token `/* value: ref */` at test/fixtures/fixtures/sugar/enum-unary.lys -391) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -392) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys -393) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -394) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -395) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -396) Unexpected token `+` at test/fixtures/fixtures/sugar/enum-unary.lys -397) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -398) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys -399) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -400) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -401) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -402) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -403) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -404) Unexpected token `memorySize` at test/fixtures/fixtures/sugar/enum-unary.lys -405) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -406) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -407) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -408) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -409) Unexpected token `1` at test/fixtures/fixtures/sugar/enum-unary.lys -410) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -411) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -412) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -413) Unexpected token `u32` at test/fixtures/fixtures/sugar/enum-unary.lys -414) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -415) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -416) Unexpected token `determinant` at test/fixtures/fixtures/sugar/enum-unary.lys -417) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -418) Unexpected token `val` at test/fixtures/fixtures/sugar/enum-unary.lys -419) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -420) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -421) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -422) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -423) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -424) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -425) Unexpected token `impl` at test/fixtures/fixtures/sugar/enum-unary.lys -426) Unexpected token ` - -` at test/fixtures/fixtures/sugar/enum-unary.lys -427) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -428) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -429) Unexpected token `}` at test/fixtures/fixtures/sugar/enum-unary.lys -430) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -431) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -432) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -433) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -434) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -435) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys -436) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -437) Unexpected token `None` at test/fixtures/fixtures/sugar/enum-unary.lys -438) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -439) Unexpected token `||` at test/fixtures/fixtures/sugar/enum-unary.lys -440) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -441) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -442) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -443) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -444) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys -445) Unexpected token `.` at test/fixtures/fixtures/sugar/enum-unary.lys -446) Unexpected token `Some` at test/fixtures/fixtures/sugar/enum-unary.lys -447) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -448) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -449) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -450) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -451) Unexpected token `=` at test/fixtures/fixtures/sugar/enum-unary.lys -452) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -453) Unexpected token `)` at test/fixtures/fixtures/sugar/enum-unary.lys -454) Unexpected token `ref` at test/fixtures/fixtures/sugar/enum-unary.lys -455) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -456) Unexpected token `:` at test/fixtures/fixtures/sugar/enum-unary.lys -457) Unexpected token `x` at test/fixtures/fixtures/sugar/enum-unary.lys -458) Unexpected token `(` at test/fixtures/fixtures/sugar/enum-unary.lys -459) Unexpected token `is` at test/fixtures/fixtures/sugar/enum-unary.lys -460) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -461) Unexpected token `fun` at test/fixtures/fixtures/sugar/enum-unary.lys -462) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -463) Unexpected token ` -` at test/fixtures/fixtures/sugar/enum-unary.lys -464) Unexpected token `{` at test/fixtures/fixtures/sugar/enum-unary.lys -465) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -466) Unexpected token `>` at test/fixtures/fixtures/sugar/enum-unary.lys -467) Unexpected token `T` at test/fixtures/fixtures/sugar/enum-unary.lys -468) Unexpected token `<` at test/fixtures/fixtures/sugar/enum-unary.lys -469) Unexpected token `Option` at test/fixtures/fixtures/sugar/enum-unary.lys -470) Unexpected token ` ` at test/fixtures/fixtures/sugar/enum-unary.lys -471) Unexpected token `impl` at test/fixtures/fixtures/sugar/enum-unary.lys + 1) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:57:1 + + 2) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:57:0 + │ + 57│ } + + │ ^ + + 3) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:56:47 + + 4) Unexpected token "false" at test/fixtures/fixtures/sugar/enum-unary.lys:56:42 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^^^ + + 5) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:41 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 6) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:56:40 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 7) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:39 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 8) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:56:32 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^^^^^ + + 9) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:31 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 10) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:30 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 11) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:56:29 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 12) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:56:25 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^^ + + 13) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:24 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 14) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:23 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 15) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:56:20 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^ + + 16) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:19 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 17) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:56:18 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 18) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:56:14 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^^ + + 19) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:13 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 20) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:12 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 21) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:56:9 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^ + + 22) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:56:8 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 23) Unexpected token "!=" at test/fixtures/fixtures/sugar/enum-unary.lys:56:6 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^ + + 24) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:5 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^ + + 25) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:56:2 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^^ + + 26) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:0 + │ + 56│ fun !=(lhs: None, rhs: None): boolean = false + + │ ^^ + + 27) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:55:46 + + 28) Unexpected token "true" at test/fixtures/fixtures/sugar/enum-unary.lys:55:42 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^^ + + 29) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:41 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 30) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:55:40 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 31) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:39 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 32) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:55:32 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^^^^^ + + 33) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:31 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 34) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:30 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 35) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:55:29 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 36) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:55:25 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^^ + + 37) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:24 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 38) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:23 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 39) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:55:20 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^ + + 40) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:19 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 41) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:55:18 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 42) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:55:14 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^^ + + 43) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:13 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 44) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:12 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 45) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:55:9 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^ + + 46) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:55:8 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 47) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:55:6 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^ + + 48) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:5 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^ + + 49) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:55:2 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^^ + + 50) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:0 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true + + │ ^^ + + 51) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:53:36 + + 52) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:53:22 + │ + 53│ fun apply(): None = staticInstance + + │ ^^^^^^^^^^^^^^ + + 53) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:21 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 54) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:53:20 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 55) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:19 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 56) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:53:15 + │ + 53│ fun apply(): None = staticInstance + + │ ^^^^ + + 57) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:14 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 58) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:53:13 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 59) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:53:12 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 60) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:53:11 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 61) Unexpected token "apply" at test/fixtures/fixtures/sugar/enum-unary.lys:53:6 + │ + 53│ fun apply(): None = staticInstance + + │ ^^^^^ + + 62) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:5 + │ + 53│ fun apply(): None = staticInstance + + │ ^ + + 63) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:53:2 + │ + 53│ fun apply(): None = staticInstance + + │ ^^^ + + 64) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:0 + │ + 53│ fun apply(): None = staticInstance + + │ ^^ + + 65) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:51:38 + + 66) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:51:24 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^^^^^^^^^^^^^^ + + 67) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:23 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 68) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:51:21 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^^ + + 69) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:20 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 70) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:51:19 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 71) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:18 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 72) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:51:17 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 73) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:16 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 74) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:51:15 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 75) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:51:12 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^^^ + + 76) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:11 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 77) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:51:10 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 78) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:51:9 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 79) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:51:8 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 80) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:51:6 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^^ + + 81) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:5 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^ + + 82) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:51:2 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^^^ + + 83) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:0 + │ + 51│ fun is(x: ref) = x == staticInstance + + │ ^^ + + 84) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:50:39 + + 85) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:50:28 + │ + 50│ val staticInstance: ref = determinant + + │ ^^^^^^^^^^^ + + 86) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:27 + │ + 50│ val staticInstance: ref = determinant + + │ ^ + + 87) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:50:26 + │ + 50│ val staticInstance: ref = determinant + + │ ^ + + 88) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:25 + │ + 50│ val staticInstance: ref = determinant + + │ ^ + + 89) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:50:22 + │ + 50│ val staticInstance: ref = determinant + + │ ^^^ + + 90) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:21 + │ + 50│ val staticInstance: ref = determinant + + │ ^ + + 91) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:50:20 + │ + 50│ val staticInstance: ref = determinant + + │ ^ + + 92) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:50:6 + │ + 50│ val staticInstance: ref = determinant + + │ ^^^^^^^^^^^^^^ + + 93) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:5 + │ + 50│ val staticInstance: ref = determinant + + │ ^ + + 94) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:50:2 + │ + 50│ val staticInstance: ref = determinant + + │ ^^^ + + 95) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:0 + │ + 50│ val staticInstance: ref = determinant + + │ ^^ + + 96) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:49:26 + + 97) Unexpected token "2" at test/fixtures/fixtures/sugar/enum-unary.lys:49:25 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 98) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:24 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 99) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:49:23 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 100) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:22 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 101) Unexpected token "u32" at test/fixtures/fixtures/sugar/enum-unary.lys:49:19 + │ + 49│ val determinant: u32 = 2 + + │ ^^^ + + 102) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:18 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 103) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:49:17 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 104) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:49:6 + │ + 49│ val determinant: u32 = 2 + + │ ^^^^^^^^^^^ + + 105) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:5 + │ + 49│ val determinant: u32 = 2 + + │ ^ + + 106) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:49:2 + │ + 49│ val determinant: u32 = 2 + + │ ^^^ + + 107) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:0 + │ + 49│ val determinant: u32 = 2 + + │ ^^ + + 108) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:48:11 + + 109) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:48:10 + │ + 48│ impl None { + + │ ^ + + 110) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:48:9 + │ + 48│ impl None { + + │ ^ + + 111) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:48:5 + │ + 48│ impl None { + + │ ^^^^ + + 112) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:48:4 + │ + 48│ impl None { + + │ ^ + + 113) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:48:0 + │ + 48│ impl None { + + │ ^^^^ + + 114) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:46:1 + + 115) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:46:0 + │ + 46│ } + + │ ^ + + 116) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:45:3 + + 117) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:45:2 + │ + 45│ } + + │ ^ + + 118) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:45:0 + │ + 45│ } + + │ ^^ + + 119) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:44:17 + + 120) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:44:16 + │ + 44│ !(lhs == rhs) + + │ ^ + + 121) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:44:13 + │ + 44│ !(lhs == rhs) + + │ ^^^ + + 122) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:12 + │ + 44│ !(lhs == rhs) + + │ ^ + + 123) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:44:10 + │ + 44│ !(lhs == rhs) + + │ ^^ + + 124) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:9 + │ + 44│ !(lhs == rhs) + + │ ^ + + 125) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:44:6 + │ + 44│ !(lhs == rhs) + + │ ^^^ + + 126) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:44:5 + │ + 44│ !(lhs == rhs) + + │ ^ + + 127) Unexpected token "!" at test/fixtures/fixtures/sugar/enum-unary.lys:44:4 + │ + 44│ !(lhs == rhs) + + │ ^ + + 128) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:0 + │ + 44│ !(lhs == rhs) + + │ ^^^^ + + 129) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:43:43 + + 130) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:43:42 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 131) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:41 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 132) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:43:40 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 133) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:39 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 134) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:43:32 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^^^^^^ + + 135) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:31 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 136) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:30 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 137) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:43:29 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 138) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:43:25 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^^^ + + 139) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:24 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 140) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:23 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 141) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:43:20 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^^ + + 142) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:19 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 143) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:43:18 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 144) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:43:14 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^^^ + + 145) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:13 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 146) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:12 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 147) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:43:9 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^^ + + 148) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:43:8 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 149) Unexpected token "!=" at test/fixtures/fixtures/sugar/enum-unary.lys:43:6 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^ + + 150) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:5 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 151) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:43:2 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^^ + + 152) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:0 + │ + 43│ fun !=(lhs: Some, rhs: Some): boolean = { + + │ ^^ + + 153) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:41:3 + + 154) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:41:2 + │ + 41│ } + + │ ^ + + 155) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:41:0 + │ + 41│ } + + │ ^^ + + 156) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:40:36 + + 157) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:40:35 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^ + + 158) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:40:32 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^^^ + + 159) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:40:31 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^ + + 160) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:40:22 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^^^^^^^^^ + + 161) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:21 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^ + + 162) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:40:19 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^^ + + 163) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:18 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^ + + 164) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:40:17 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^ + + 165) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:40:14 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^^^ + + 166) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:40:13 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^ + + 167) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:40:4 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^^^^^^^^^ + + 168) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:0 + │ + 40│ get_value(lhs) == get_value(rhs) + + │ ^^^^ + + 169) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:39:43 + + 170) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:39:42 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 171) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:41 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 172) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:39:40 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 173) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:39 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 174) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:39:32 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^^^^^^ + + 175) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:31 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 176) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:30 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 177) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:39:29 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 178) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:39:25 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^^^ + + 179) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:24 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 180) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:23 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 181) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:39:20 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^^ + + 182) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:19 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 183) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:39:18 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 184) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:39:14 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^^^ + + 185) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:13 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 186) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:12 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 187) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:39:9 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^^ + + 188) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:39:8 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 189) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:39:6 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^ + + 190) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:5 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^ + + 191) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:39:2 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^^ + + 192) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:0 + │ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { + + │ ^^ + + 193) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:37:3 + + 194) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:37:2 + │ + 37│ } + + │ ^ + + 195) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:37:0 + │ + 37│ } + + │ ^^ + + 196) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:36:33 + + 197) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:36:32 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 198) Unexpected token "newValue" at test/fixtures/fixtures/sugar/enum-unary.lys:36:24 + │ + 36│ ref.store(base + 0, newValue) + + │ ^^^^^^^^ + + 199) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:23 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 200) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:36:22 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 201) Unexpected token "0" at test/fixtures/fixtures/sugar/enum-unary.lys:36:21 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 202) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:20 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 203) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:36:19 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 204) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:18 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 205) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:36:14 + │ + 36│ ref.store(base + 0, newValue) + + │ ^^^^ + + 206) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:36:13 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 207) Unexpected token "store" at test/fixtures/fixtures/sugar/enum-unary.lys:36:8 + │ + 36│ ref.store(base + 0, newValue) + + │ ^^^^^ + + 208) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:36:7 + │ + 36│ ref.store(base + 0, newValue) + + │ ^ + + 209) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:36:4 + │ + 36│ ref.store(base + 0, newValue) + + │ ^^^ + + 210) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:0 + │ + 36│ ref.store(base + 0, newValue) + + │ ^^^^ + + 211) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:35:28 + + 212) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:35:27 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 213) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:35:24 + │ + 35│ val base = ref.base(ptr) + + │ ^^^ + + 214) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:35:23 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 215) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:35:19 + │ + 35│ val base = ref.base(ptr) + + │ ^^^^ + + 216) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:35:18 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 217) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:35:15 + │ + 35│ val base = ref.base(ptr) + + │ ^^^ + + 218) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:14 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 219) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:35:13 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 220) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:12 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 221) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:35:8 + │ + 35│ val base = ref.base(ptr) + + │ ^^^^ + + 222) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:7 + │ + 35│ val base = ref.base(ptr) + + │ ^ + + 223) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:35:4 + │ + 35│ val base = ref.base(ptr) + + │ ^^^ + + 224) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:0 + │ + 35│ val base = ref.base(ptr) + + │ ^^^^ + + 225) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:34:59 + + 226) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:34:58 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 227) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:57 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 228) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:34:56 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 229) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:55 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 230) Unexpected token "void" at test/fixtures/fixtures/sugar/enum-unary.lys:34:51 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^^ + + 231) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:50 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 232) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:49 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 233) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:34:48 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 234) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:34:45 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^ + + 235) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:44 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 236) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:43 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 237) Unexpected token "newValue" at test/fixtures/fixtures/sugar/enum-unary.lys:34:35 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^^^^^^ + + 238) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:34 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 239) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:34:33 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 240) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:34:29 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^^ + + 241) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:28 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 242) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:27 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 243) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:34:24 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^ + + 244) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:34:23 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 245) Unexpected token "set_value" at test/fixtures/fixtures/sugar/enum-unary.lys:34:14 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^^^^^^^ + + 246) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:13 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 247) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:34:10 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^ + + 248) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:9 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^ + + 249) Unexpected token "private" at test/fixtures/fixtures/sugar/enum-unary.lys:34:2 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^^^^^^ + + 250) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:0 + │ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { + + │ ^^ + + 251) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:32:3 + + 252) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:32:2 + │ + 32│ } + + │ ^ + + 253) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:32:0 + │ + 32│ } + + │ ^^ + + 254) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:31:22 + + 255) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:31:21 + │ + 31│ ref.read(base + 0) + + │ ^ + + 256) Unexpected token "0" at test/fixtures/fixtures/sugar/enum-unary.lys:31:20 + │ + 31│ ref.read(base + 0) + + │ ^ + + 257) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:19 + │ + 31│ ref.read(base + 0) + + │ ^ + + 258) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:31:18 + │ + 31│ ref.read(base + 0) + + │ ^ + + 259) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:17 + │ + 31│ ref.read(base + 0) + + │ ^ + + 260) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:31:13 + │ + 31│ ref.read(base + 0) + + │ ^^^^ + + 261) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:31:12 + │ + 31│ ref.read(base + 0) + + │ ^ + + 262) Unexpected token "read" at test/fixtures/fixtures/sugar/enum-unary.lys:31:8 + │ + 31│ ref.read(base + 0) + + │ ^^^^ + + 263) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:31:7 + │ + 31│ ref.read(base + 0) + + │ ^ + + 264) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:31:4 + │ + 31│ ref.read(base + 0) + + │ ^^^ + + 265) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:0 + │ + 31│ ref.read(base + 0) + + │ ^^^^ + + 266) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:30:28 + + 267) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:30:27 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 268) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:30:24 + │ + 30│ val base = ref.base(ptr) + + │ ^^^ + + 269) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:30:23 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 270) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:30:19 + │ + 30│ val base = ref.base(ptr) + + │ ^^^^ + + 271) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:30:18 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 272) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:30:15 + │ + 30│ val base = ref.base(ptr) + + │ ^^^ + + 273) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:14 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 274) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:30:13 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 275) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:12 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 276) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:30:8 + │ + 30│ val base = ref.base(ptr) + + │ ^^^^ + + 277) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:7 + │ + 30│ val base = ref.base(ptr) + + │ ^ + + 278) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:30:4 + │ + 30│ val base = ref.base(ptr) + + │ ^^^ + + 279) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:0 + │ + 30│ val base = ref.base(ptr) + + │ ^^^^ + + 280) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:29:35 + + 281) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:29:34 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 282) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:33 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 283) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:29:32 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 284) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:31 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 285) Unexpected token "f32" at test/fixtures/fixtures/sugar/enum-unary.lys:29:28 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^^^ + + 286) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:27 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 287) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:29:26 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 288) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:29:25 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 289) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:29:21 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^^^^ + + 290) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:20 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 291) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:29:19 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 292) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:29:16 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^^^ + + 293) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:29:15 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 294) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:29:6 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^^^^^^^^^ + + 295) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:5 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^ + + 296) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:29:2 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^^^ + + 297) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:0 + │ + 29│ fun get_value(ptr: Some): f32 = { + + │ ^^ + + 298) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:27:3 + + 299) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:27:2 + │ + 27│ } + + │ ^ + + 300) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:27:0 + │ + 27│ } + + │ ^^ + + 301) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:26:18 + + 302) Unexpected token "Celcius" at test/fixtures/fixtures/sugar/enum-unary.lys:26:11 + │ + 26│ ref as Celcius + + │ ^^^^^^^ + + 303) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:10 + │ + 26│ ref as Celcius + + │ ^ + + 304) Unexpected token "as" at test/fixtures/fixtures/sugar/enum-unary.lys:26:8 + │ + 26│ ref as Celcius + + │ ^^ + + 305) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:7 + │ + 26│ ref as Celcius + + │ ^ + + 306) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:26:4 + │ + 26│ ref as Celcius + + │ ^^^ + + 307) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:0 + │ + 26│ ref as Celcius + + │ ^^^^ + + 308) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:25:25 + + 309) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:25:24 + │ + 25│ set_value(ptr, value) + + │ ^ + + 310) Unexpected token "value" at test/fixtures/fixtures/sugar/enum-unary.lys:25:19 + │ + 25│ set_value(ptr, value) + + │ ^^^^^ + + 311) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:25:18 + │ + 25│ set_value(ptr, value) + + │ ^ + + 312) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:25:17 + │ + 25│ set_value(ptr, value) + + │ ^ + + 313) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:25:14 + │ + 25│ set_value(ptr, value) + + │ ^^^ + + 314) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:25:13 + │ + 25│ set_value(ptr, value) + + │ ^ + + 315) Unexpected token "set_value" at test/fixtures/fixtures/sugar/enum-unary.lys:25:4 + │ + 25│ set_value(ptr, value) + + │ ^^^^^^^^^ + + 316) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:25:0 + │ + 25│ set_value(ptr, value) + + │ ^^^^ + + 317) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:24:82 + + 318) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:24:78 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^ + + 319) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:77 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 320) Unexpected token "as" at test/fixtures/fixtures/sugar/enum-unary.lys:24:75 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^ + + 321) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:74 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 322) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:24:73 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 323) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:24:72 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 324) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:24:62 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^^^^^^^ + + 325) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:24:61 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 326) Unexpected token "malloc" at test/fixtures/fixtures/sugar/enum-unary.lys:24:55 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^^^ + + 327) Unexpected token "::" at test/fixtures/fixtures/sugar/enum-unary.lys:24:53 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^ + + 328) Unexpected token "memory" at test/fixtures/fixtures/sugar/enum-unary.lys:24:47 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^^^ + + 329) Unexpected token "::" at test/fixtures/fixtures/sugar/enum-unary.lys:24:45 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^ + + 330) Unexpected token "core" at test/fixtures/fixtures/sugar/enum-unary.lys:24:41 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^ + + 331) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:40 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 332) Unexpected token "|" at test/fixtures/fixtures/sugar/enum-unary.lys:24:39 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 333) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:38 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 334) Unexpected token "32" at test/fixtures/fixtures/sugar/enum-unary.lys:24:36 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^ + + 335) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:35 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 336) Unexpected token "<<" at test/fixtures/fixtures/sugar/enum-unary.lys:24:33 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^ + + 337) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:32 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 338) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:24:21 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^^^^^^^^ + + 339) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:24:20 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 340) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:19 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 341) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:24:18 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 342) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:17 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 343) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:24:13 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^ + + 344) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:12 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 345) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:24:11 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 346) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:24:8 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^ + + 347) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:7 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^ + + 348) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:24:4 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^ + + 349) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:0 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + + │ ^^^^ + + 350) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:23:33 + + 351) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:23:32 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 352) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:31 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 353) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:23:30 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 354) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:29 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 355) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:23:25 + │ + 23│ fun apply(value: ref): Some = { + + │ ^^^^ + + 356) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:24 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 357) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:23:23 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 358) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:23:22 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 359) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:23:19 + │ + 23│ fun apply(value: ref): Some = { + + │ ^^^ + + 360) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:18 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 361) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:23:17 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 362) Unexpected token "value" at test/fixtures/fixtures/sugar/enum-unary.lys:23:12 + │ + 23│ fun apply(value: ref): Some = { + + │ ^^^^^ + + 363) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:23:11 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 364) Unexpected token "apply" at test/fixtures/fixtures/sugar/enum-unary.lys:23:6 + │ + 23│ fun apply(value: ref): Some = { + + │ ^^^^^ + + 365) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:5 + │ + 23│ fun apply(value: ref): Some = { + + │ ^ + + 366) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:23:2 + │ + 23│ fun apply(value: ref): Some = { + + │ ^^^ + + 367) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:0 + │ + 23│ fun apply(value: ref): Some = { + + │ ^^ + + 368) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:21:47 + + 369) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:21:36 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^^^^^^^^^^ + + 370) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:35 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 371) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:21:33 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^ + + 372) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:32 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 373) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:21:21 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^^^^^^^^^^ + + 374) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:21:20 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 375) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:21:19 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 376) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:18 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 377) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:21:17 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 378) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:16 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 379) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:21:15 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 380) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:21:12 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^^ + + 381) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:11 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 382) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:21:10 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 383) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:21:9 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 384) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:21:8 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 385) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:21:6 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^ + + 386) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:5 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^ + + 387) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:21:2 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^^ + + 388) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:0 + │ + 21│ fun is(x: ref) = x.determinant == determinant + + │ ^^ + + 389) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:20:67 + + 390) Unexpected token "/* value: ref */" at test/fixtures/fixtures/sugar/enum-unary.lys:20:51 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^^^^^^^^^^^^^^ + + 391) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:50 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 392) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:40 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^^^^^^^^ + + 393) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:20:39 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 394) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:20:36 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^ + + 395) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:35 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 396) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:20:34 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 397) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:33 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 398) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:23 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^^^^^^^^ + + 399) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:20:22 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 400) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:20:19 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^ + + 401) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:18 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 402) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:20:17 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 403) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:16 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 404) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:6 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^^^^^^^^ + + 405) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:5 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^ + + 406) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:20:2 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^^ + + 407) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:0 + │ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + + │ ^^ + + 408) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:19:26 + + 409) Unexpected token "1" at test/fixtures/fixtures/sugar/enum-unary.lys:19:25 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 410) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:24 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 411) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:19:23 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 412) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:22 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 413) Unexpected token "u32" at test/fixtures/fixtures/sugar/enum-unary.lys:19:19 + │ + 19│ val determinant: u32 = 1 + + │ ^^^ + + 414) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:18 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 415) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:19:17 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 416) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:19:6 + │ + 19│ val determinant: u32 = 1 + + │ ^^^^^^^^^^^ + + 417) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:5 + │ + 19│ val determinant: u32 = 1 + + │ ^ + + 418) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:19:2 + │ + 19│ val determinant: u32 = 1 + + │ ^^^ + + 419) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:0 + │ + 19│ val determinant: u32 = 1 + + │ ^^ + + 420) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:18:11 + + 421) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:18:10 + │ + 18│ impl Some { + + │ ^ + + 422) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:18:9 + │ + 18│ impl Some { + + │ ^ + + 423) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:18:5 + │ + 18│ impl Some { + + │ ^^^^ + + 424) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:18:4 + │ + 18│ impl Some { + + │ ^ + + 425) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:18:0 + │ + 18│ impl Some { + + │ ^^^^ + + 426) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:16:1 + + 427) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:16:0 + │ + 16│ } + + │ ^ + + 428) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:15:3 + + 429) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:15:2 + │ + 15│ } + + │ ^ + + 430) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:15:0 + │ + 15│ } + + │ ^^ + + 431) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:14:28 + + 432) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:14:27 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 433) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:14:26 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 434) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:14:25 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 435) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:14:23 + │ + 14│ Some.is(x) || None.is(x) + + │ ^^ + + 436) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:14:22 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 437) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:14:18 + │ + 14│ Some.is(x) || None.is(x) + + │ ^^^^ + + 438) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:17 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 439) Unexpected token "||" at test/fixtures/fixtures/sugar/enum-unary.lys:14:15 + │ + 14│ Some.is(x) || None.is(x) + + │ ^^ + + 440) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:14 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 441) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:14:13 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 442) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:14:12 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 443) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:14:11 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 444) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:14:9 + │ + 14│ Some.is(x) || None.is(x) + + │ ^^ + + 445) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:14:8 + │ + 14│ Some.is(x) || None.is(x) + + │ ^ + + 446) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:14:4 + │ + 14│ Some.is(x) || None.is(x) + + │ ^^^^ + + 447) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:0 + │ + 14│ Some.is(x) || None.is(x) + + │ ^^^^ + + 448) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:13:20 + + 449) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:13:19 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 450) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:18 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 451) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:13:17 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 452) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:16 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 453) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:13:15 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 454) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:13:12 + │ + 13│ fun is(x: ref) = { + + │ ^^^ + + 455) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:11 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 456) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:13:10 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 457) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:13:9 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 458) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:13:8 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 459) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:13:6 + │ + 13│ fun is(x: ref) = { + + │ ^^ + + 460) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:5 + │ + 13│ fun is(x: ref) = { + + │ ^ + + 461) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:13:2 + │ + 13│ fun is(x: ref) = { + + │ ^^^ + + 462) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:0 + │ + 13│ fun is(x: ref) = { + + │ ^^ + + 463) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:12:16 + + 464) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:12:15 + │ + 12│ impl Option { + + │ ^ + + 465) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:12:14 + │ + 12│ impl Option { + + │ ^ + + 466) Unexpected token ">" at test/fixtures/fixtures/sugar/enum-unary.lys:12:13 + │ + 12│ impl Option { + + │ ^ + + 467) Unexpected token "T" at test/fixtures/fixtures/sugar/enum-unary.lys:12:12 + │ + 12│ impl Option { + + │ ^ + + 468) Unexpected token "<" at test/fixtures/fixtures/sugar/enum-unary.lys:12:11 + │ + 12│ impl Option { + + │ ^ + + 469) Unexpected token "Option" at test/fixtures/fixtures/sugar/enum-unary.lys:12:5 + │ + 12│ impl Option { + + │ ^^^^^^ + + 470) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:12:4 + │ + 12│ impl Option { + + │ ^ + + 471) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:12:0 + │ + 12│ impl Option { + + │ ^^^^ + diff --git a/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error b/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error index 2e9ec41..15afd30 100644 --- a/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error +++ b/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error @@ -1,32 +1,143 @@ -1) Unexpected token `.` at test/fixtures/syntaxerrors/expectedtype.lys -2) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -3) Unexpected token `&` at test/fixtures/syntaxerrors/expectedtype.lys -4) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -5) Unexpected token `a` at test/fixtures/syntaxerrors/expectedtype.lys -6) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -7) Unexpected token `=` at test/fixtures/syntaxerrors/expectedtype.lys -8) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -9) Unexpected token `b` at test/fixtures/syntaxerrors/expectedtype.lys -10) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -11) Unexpected token `type` at test/fixtures/syntaxerrors/expectedtype.lys -12) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -13) Unexpected token `|` at test/fixtures/syntaxerrors/expectedtype.lys -14) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -15) Unexpected token `a` at test/fixtures/syntaxerrors/expectedtype.lys -16) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -17) Unexpected token `=` at test/fixtures/syntaxerrors/expectedtype.lys -18) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -19) Unexpected token `b` at test/fixtures/syntaxerrors/expectedtype.lys -20) Unexpected token ` ` at test/fixtures/syntaxerrors/expectedtype.lys -21) Unexpected token `type` at test/fixtures/syntaxerrors/expectedtype.lys -22) Unexpected token ` - - -` at test/fixtures/syntaxerrors/expectedtype.lys -23) Unexpected token `}` at test/fixtures/syntaxerrors/expectedtype.lys -24) Unexpected token `{` at test/fixtures/syntaxerrors/expectedtype.lys -25) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys -26) Unexpected token ` -` at test/fixtures/syntaxerrors/expectedtype.lys -27) Unexpected token `1` at test/fixtures/syntaxerrors/expectedtype.lys -28) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys + 1) Unexpected token "." at test/fixtures/syntaxerrors/expectedtype.lys:10:26 + │ + 10│ type b = a | type b = a & . + │ ^ + + 2) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:25 + │ + 10│ type b = a | type b = a & . + │ ^ + + 3) Unexpected token "&" at test/fixtures/syntaxerrors/expectedtype.lys:10:24 + │ + 10│ type b = a | type b = a & . + │ ^ + + 4) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:23 + │ + 10│ type b = a | type b = a & . + │ ^ + + 5) Unexpected token "a" at test/fixtures/syntaxerrors/expectedtype.lys:10:22 + │ + 10│ type b = a | type b = a & . + │ ^ + + 6) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:21 + │ + 10│ type b = a | type b = a & . + │ ^ + + 7) Unexpected token "=" at test/fixtures/syntaxerrors/expectedtype.lys:10:20 + │ + 10│ type b = a | type b = a & . + │ ^ + + 8) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:19 + │ + 10│ type b = a | type b = a & . + │ ^ + + 9) Unexpected token "b" at test/fixtures/syntaxerrors/expectedtype.lys:10:18 + │ + 10│ type b = a | type b = a & . + │ ^ + + 10) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:17 + │ + 10│ type b = a | type b = a & . + │ ^ + + 11) Unexpected token "type" at test/fixtures/syntaxerrors/expectedtype.lys:10:13 + │ + 10│ type b = a | type b = a & . + │ ^^^^ + + 12) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:12 + │ + 10│ type b = a | type b = a & . + │ ^ + + 13) Unexpected token "|" at test/fixtures/syntaxerrors/expectedtype.lys:10:11 + │ + 10│ type b = a | type b = a & . + │ ^ + + 14) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:10 + │ + 10│ type b = a | type b = a & . + │ ^ + + 15) Unexpected token "a" at test/fixtures/syntaxerrors/expectedtype.lys:10:9 + │ + 10│ type b = a | type b = a & . + │ ^ + + 16) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:8 + │ + 10│ type b = a | type b = a & . + │ ^ + + 17) Unexpected token "=" at test/fixtures/syntaxerrors/expectedtype.lys:10:7 + │ + 10│ type b = a | type b = a & . + │ ^ + + 18) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:6 + │ + 10│ type b = a | type b = a & . + │ ^ + + 19) Unexpected token "b" at test/fixtures/syntaxerrors/expectedtype.lys:10:5 + │ + 10│ type b = a | type b = a & . + │ ^ + + 20) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:4 + │ + 10│ type b = a | type b = a & . + │ ^ + + 21) Unexpected token "type" at test/fixtures/syntaxerrors/expectedtype.lys:10:0 + │ + 10│ type b = a | type b = a & . + │ ^^^^ + + 22) Unexpected token " + + +" at test/fixtures/syntaxerrors/expectedtype.lys:7:1 + + 23) Unexpected token "}" at test/fixtures/syntaxerrors/expectedtype.lys:7:0 + │ + 7│ } + + │ ^ + + 24) Unexpected token "{" at test/fixtures/syntaxerrors/expectedtype.lys:6:7 + │ + 6│ a as {} + + │ ^ + + 25) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys:6:7 + │ + 6│ a as {} + + │ ^ + + 26) Unexpected token " +" at test/fixtures/syntaxerrors/expectedtype.lys:3:3 + + 27) Unexpected token "1" at test/fixtures/syntaxerrors/expectedtype.lys:3:2 + │ + 3│ 1 + + │ ^ + + 28) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys:3:2 + │ + 3│ 1 + + │ ^ + diff --git a/test/fixtures/syntaxerrors/missingtype.lys.syntax-error b/test/fixtures/syntaxerrors/missingtype.lys.syntax-error index 5d905e0..728f3e3 100644 --- a/test/fixtures/syntaxerrors/missingtype.lys.syntax-error +++ b/test/fixtures/syntaxerrors/missingtype.lys.syntax-error @@ -1 +1,5 @@ -1) A type or effect was expected at test/fixtures/syntaxerrors/missingtype.lys + 1) A type or effect was expected at test/fixtures/syntaxerrors/missingtype.lys:1:6 + │ + 1│ var x: = 1 + │ ^ + diff --git a/test/fixtures/syntaxerrors/var.lys.syntax-error b/test/fixtures/syntaxerrors/var.lys.syntax-error index ea506a7..2a95e32 100644 --- a/test/fixtures/syntaxerrors/var.lys.syntax-error +++ b/test/fixtures/syntaxerrors/var.lys.syntax-error @@ -1,12 +1,53 @@ -1) Unexpected token `1` at test/fixtures/syntaxerrors/var.lys -2) Unexpected token ` ` at test/fixtures/syntaxerrors/var.lys -3) Unexpected token `=` at test/fixtures/syntaxerrors/var.lys -4) Unexpected token ` ` at test/fixtures/syntaxerrors/var.lys -5) Unexpected token `var` at test/fixtures/syntaxerrors/var.lys -6) Unexpected token ` - -` at test/fixtures/syntaxerrors/var.lys -7) Unexpected token `var` at test/fixtures/syntaxerrors/var.lys -8) Unexpected token ` ` at test/fixtures/syntaxerrors/var.lys -9) Unexpected token `var` at test/fixtures/syntaxerrors/var.lys -10) A value was expected. at test/fixtures/syntaxerrors/var.lys + 1) Unexpected token "1" at test/fixtures/syntaxerrors/var.lys:6:6 + │ + 6│ var = 1 + │ ^ + + 2) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:6:5 + │ + 6│ var = 1 + │ ^ + + 3) Unexpected token "=" at test/fixtures/syntaxerrors/var.lys:6:4 + │ + 6│ var = 1 + │ ^ + + 4) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:6:3 + │ + 6│ var = 1 + │ ^ + + 5) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:6:0 + │ + 6│ var = 1 + │ ^^^ + + 6) Unexpected token " + +" at test/fixtures/syntaxerrors/var.lys:4:7 + + 7) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:4:4 + │ + 4│ var var + + │ ^^^ + + 8) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:4:3 + │ + 4│ var var + + │ ^ + + 9) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:4:0 + │ + 4│ var var + + │ ^^^ + + 10) A value was expected. at test/fixtures/syntaxerrors/var.lys:2:0 + │ + 2│ var y = 1 + + │ ^^^ + diff --git a/test/fixtures/syntaxerrors/wasm.lys.syntax-error b/test/fixtures/syntaxerrors/wasm.lys.syntax-error index 91a9f57..c9865de 100644 --- a/test/fixtures/syntaxerrors/wasm.lys.syntax-error +++ b/test/fixtures/syntaxerrors/wasm.lys.syntax-error @@ -1,4 +1,17 @@ -1) Unexpected token `)` at test/fixtures/syntaxerrors/wasm.lys -2) Unexpected token `(` at test/fixtures/syntaxerrors/wasm.lys -3) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys -4) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys + 1) Unexpected token ")" at test/fixtures/syntaxerrors/wasm.lys:7:23 + │ + 7│ fun x(): void = %wasm () + │ ^ + + 2) Unexpected token "(" at test/fixtures/syntaxerrors/wasm.lys:7:22 + │ + 7│ fun x(): void = %wasm () + │ ^ + + 3) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys:7:21 + │ + 7│ fun x(): void = %wasm () + │ ^ + + 4) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys:3:21 + diff --git a/test/helpers.lys b/test/helpers.lys index 8fd64b3..8e09671 100644 --- a/test/helpers.lys +++ b/test/helpers.lys @@ -12,9 +12,9 @@ fun testHelpers(): void = { START("Helpers") stringBuilder() messageCollector() - testContextWithErrors() - testContextWithNoErrors() lineMapper() + testContextWithNoErrors() + testContextWithErrors() END() } @@ -91,10 +91,10 @@ fun testContextWithErrors(): void = { val cc = src::compiler::context::CompilerContext() cc.getModuleByContent("moduleOk.lys", "test::moduleOk", "fun test(): i32 = 1") - cc.getModuleByContent("module.lys", "test::module", "fun test(): = ") + cc.getModuleByContent("module.lys", "test::module", "val x = \nfun x(): i32 = 1\nfun test(): = ") cc.getModuleByContent("module2.lys", "test::module2", "fun test(asd: ): void = {}") - mustEqual(cc.printErrors(sb), 3, "Three errors must be registered") + mustEqual(cc.printErrors(sb), 4, "Three errors must be registered") support::env::printf("Given errors:") support::env::printf(sb.toString()) @@ -125,6 +125,25 @@ fun lineMapper(): void = { testLine(lm, 28, 9) testLine(lm, 120, 11) + match lm.getLinePosition(7 as u32) { + case is Line(line, start, end) -> { + mustEqual(line, 7 as u32, "Line") + mustEqual(start, 24 as u32, "Start") + mustEqual(end, 26 as u32, "End") + } + else -> verify(false, "Line position doesn't work") + } + + match lm.getLinePosition(0 as u32) { + case is Line(line, start, end) -> { + mustEqual(line, 0 as u32, "Line") + mustEqual(start, 0 as u32, "Start") + mustEqual(end, 5 as u32, "End") + } + else -> verify(false, "Line position doesn't work") + } + + lm.printTo(sb, 0) val res = sb.toString() diff --git a/test/parser.spec.ts b/test/parser.spec.ts index ab0bb94..a494e88 100755 --- a/test/parser.spec.ts +++ b/test/parser.spec.ts @@ -2,6 +2,14 @@ import { folderBasedTest } from "./fbt"; import { resolve } from "path"; import tokenizer from "../dist"; +const ansiRegex = new RegExp( + [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" + ].join("|"), + "g" +); + folderBasedTest( resolve(__dirname, "./fixtures/") + "/**/*.lys", async source => { @@ -28,14 +36,15 @@ folderBasedTest( ".lys.ast-2" ); - folderBasedTest( resolve(__dirname, "./fixtures/") + "/**/*.lys", async (source, fileName) => { const instance = await tokenizer(); const result = instance.parseAndEmitErrors(fileName, fileName, source); - return result || null; + if (result) console.log(result); + + return result.replace(ansiRegex, "") || null; }, ".syntax-error" ); From 4aadc9fe4fa50d1702edb5a7224547b18e34d227 Mon Sep 17 00:00:00 2001 From: Agustin Mendez Date: Mon, 30 Dec 2019 11:22:24 -0300 Subject: [PATCH 4/4] reverse printing order --- src/compiler/context.lys | 6 +- .../canonical/effects.lys.syntax-error | 970 +++--- .../fixtures/parser-error/b.lys.syntax-error | 32 +- .../fixtures/parser-error/d.lys.syntax-error | 32 +- .../fixtures/parser-error/h.lys.syntax-error | 8 +- .../fixtures/parser-error/j.lys.syntax-error | 8 +- .../fixtures/parser-error/k.lys.syntax-error | 16 +- .../fixtures/parser-error/l.lys.syntax-error | 16 +- .../fixtures/parser-error/o.lys.syntax-error | 4 +- .../sugar/enum-temperature.lys.syntax-error | 32 +- .../sugar/enum-unary.lys.syntax-error | 2754 ++++++++--------- .../expectedtype.lys.syntax-error | 150 +- .../syntaxerrors/var.lys.syntax-error | 60 +- .../syntaxerrors/wasm.lys.syntax-error | 14 +- 14 files changed, 2051 insertions(+), 2051 deletions(-) diff --git a/src/compiler/context.lys b/src/compiler/context.lys index 4e8ece0..e65e05c 100644 --- a/src/compiler/context.lys +++ b/src/compiler/context.lys @@ -171,10 +171,10 @@ impl CompilerContext { } } case is MessageCons(head, tail) -> { - // Print the first error, return the current number - val newNumber = printErrors(self, head, sb, path, counter) + // Print the first errors, return the current number + val newNumber = printErrors(self, tail, sb, path, counter) // Print the rest of the errors - printErrors(self, tail, sb, path, newNumber) + printErrors(self, head, sb, path, newNumber) } else -> counter } diff --git a/test/fixtures/fixtures/canonical/effects.lys.syntax-error b/test/fixtures/fixtures/canonical/effects.lys.syntax-error index d64a681..fcfe710 100644 --- a/test/fixtures/fixtures/canonical/effects.lys.syntax-error +++ b/test/fixtures/fixtures/canonical/effects.lys.syntax-error @@ -1,952 +1,952 @@ - 1) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:27:0 + 1) A type or effect was expected at test/fixtures/fixtures/canonical/effects.lys:10:16 │ - 27│ } - │ ^ + 10│ fun sqr(x: i32): <> i32 = x * x - 2) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:26:3 + │ ^ - 3) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:26:2 + 2) Unexpected token "<>" at test/fixtures/fixtures/canonical/effects.lys:10:17 │ - 26│ } + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^^ - 4) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:26:0 + 3) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:19 │ - 26│ } - - │ ^^ + 10│ fun sqr(x: i32): <> i32 = x * x - 5) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:25:9 + │ ^ - 6) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:25:8 + 4) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:10:20 │ - 25│ a / b + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^^^ - 7) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:7 + 5) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:23 │ - 25│ a / b + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^ - 8) Unexpected token "/" at test/fixtures/fixtures/canonical/effects.lys:25:6 + 6) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:10:24 │ - 25│ a / b + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^ - 9) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:5 + 7) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:25 │ - 25│ a / b + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^ - 10) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:25:4 + 8) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:10:26 │ - 25│ a / b + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^ - 11) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:0 + 9) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:27 │ - 25│ a / b + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^^^^ + │ ^ - 12) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:24:10 + 10) Unexpected token "*" at test/fixtures/fixtures/canonical/effects.lys:10:28 + │ + 10│ fun sqr(x: i32): <> i32 = x * x + + │ ^ - 13) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:24:9 + 11) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:29 │ - 24│ } else { + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^ - 14) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:8 + 12) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:10:30 │ - 24│ } else { + 10│ fun sqr(x: i32): <> i32 = x * x - │ ^ + │ ^ - 15) Unexpected token "else" at test/fixtures/fixtures/canonical/effects.lys:24:4 + 13) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:10:31 + + 14) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:11:0 │ - 24│ } else { + 11│ fun sqr(x: i32): i32 = x * x - │ ^^^^ + │ ^^^ - 16) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:3 + 15) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:3 │ - 24│ } else { + 11│ fun sqr(x: i32): i32 = x * x │ ^ - 17) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:24:2 + 16) Unexpected token "sqr" at test/fixtures/fixtures/canonical/effects.lys:11:4 │ - 24│ } else { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^^^ - 18) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:0 + 17) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:11:7 │ - 24│ } else { - - │ ^^ + 11│ fun sqr(x: i32): i32 = x * x - 19) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:23:11 + │ ^ - 20) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:23:10 + 18) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:8 │ - 23│ raise() + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 21) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:23:9 + 19) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:11:9 │ - 23│ raise() + 11│ fun sqr(x: i32): i32 = x * x │ ^ - 22) Unexpected token "raise" at test/fixtures/fixtures/canonical/effects.lys:23:4 + 20) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:10 │ - 23│ raise() + 11│ fun sqr(x: i32): i32 = x * x - │ ^^^^^ + │ ^ - 23) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:23:0 + 21) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:11:11 │ - 23│ raise() - - │ ^^^^ + 11│ fun sqr(x: i32): i32 = x * x - 24) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:22:15 + │ ^^^ - 25) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:22:14 + 22) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:11:14 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x │ ^ - 26) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:13 + 23) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:11:15 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 27) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:22:12 + 24) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:16 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 28) Unexpected token "0" at test/fixtures/fixtures/canonical/effects.lys:22:11 + 25) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:11:17 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^^^ - 29) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:10 + 26) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:20 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 30) Unexpected token "==" at test/fixtures/fixtures/canonical/effects.lys:22:8 + 27) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:11:21 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^^ + │ ^ - 31) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:7 + 28) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:22 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 32) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:22:6 + 29) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:23 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 33) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:22:5 + 30) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:24 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 34) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:4 + 31) Unexpected token "*" at test/fixtures/fixtures/canonical/effects.lys:11:25 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^ + │ ^ - 35) Unexpected token "if" at test/fixtures/fixtures/canonical/effects.lys:22:2 + 32) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:26 │ - 22│ if (b == 0) { + 11│ fun sqr(x: i32): i32 = x * x - │ ^^ + │ ^ - 36) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:0 + 33) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:27 │ - 22│ if (b == 0) { - - │ ^^ + 11│ fun sqr(x: i32): i32 = x * x - 37) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:21:40 + │ ^ - 38) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:21:39 - │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 34) Unexpected token " - │ ^ +" at test/fixtures/fixtures/canonical/effects.lys:11:28 - 39) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:38 + 35) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:13:0 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^^^ - 40) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:21:37 + 36) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:3 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 41) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:36 + 37) Unexpected token "safeDiv" at test/fixtures/fixtures/canonical/effects.lys:13:4 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^^^^^^^ - 42) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:33 + 38) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:13:11 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^^^ + │ ^ - 43) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:32 + 39) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:12 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 44) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:21:31 + 40) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:13:13 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 45) Unexpected token "_" at test/fixtures/fixtures/canonical/effects.lys:21:30 + 41) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:13:14 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 46) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:21:29 + 42) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:13:15 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 47) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:28 + 43) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:16 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 48) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:27 + 44) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:17 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 49) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:21:26 + 45) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:18 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 50) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:23 + 46) Unexpected token "," at test/fixtures/fixtures/canonical/effects.lys:13:19 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^^^ + │ ^ - 51) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:22 + 47) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:20 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 52) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:21 + 48) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:13:21 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { │ ^ - 53) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:21:20 + 49) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:22 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 54) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:19 + 50) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:23 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 55) Unexpected token "," at test/fixtures/fixtures/canonical/effects.lys:21:18 + 51) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:24 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 56) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:15 + 52) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:13:25 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^^^ + │ ^ - 57) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:14 + 53) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:26 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 58) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:13 + 54) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:27 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 59) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:21:12 + 55) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:13:28 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 60) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:21:11 + 56) Unexpected token "exn" at test/fixtures/fixtures/canonical/effects.lys:13:29 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^^^ - 61) Unexpected token "zeroDiv" at test/fixtures/fixtures/canonical/effects.lys:21:4 + 57) Unexpected token "|" at test/fixtures/fixtures/canonical/effects.lys:13:32 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^^^^^^^ + │ ^ - 62) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:3 + 58) Unexpected token "_" at test/fixtures/fixtures/canonical/effects.lys:13:33 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 63) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:21:0 + 59) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:13:34 │ - 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { + 13│ fun safeDiv(a: T, b: T): T = { - │ ^^^ + │ ^ - 64) Unexpected token " + 60) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:35 + │ + 13│ fun safeDiv(a: T, b: T): T = { -" at test/fixtures/fixtures/canonical/effects.lys:19:1 + │ ^ - 65) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:19:0 + 61) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:36 │ - 19│ } - - │ ^ + 13│ fun safeDiv(a: T, b: T): T = { - 66) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:18:3 + │ ^ - 67) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:18:2 + 62) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:37 │ - 18│ } + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 68) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:18:0 + 63) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:13:38 │ - 18│ } + 13│ fun safeDiv(a: T, b: T): T = { - │ ^^ + │ ^ - 69) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:17:9 - - 70) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:17:8 + 64) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:39 │ - 17│ a / b + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ - 71) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:7 + 65) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:13:40 │ - 17│ a / b + 13│ fun safeDiv(a: T, b: T): T = { - │ ^ + │ ^ + + 66) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:13:41 - 72) Unexpected token "/" at test/fixtures/fixtures/canonical/effects.lys:17:6 + 67) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:0 │ - 17│ a / b + 14│ if (b == 0) { - │ ^ + │ ^^ - 73) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:5 + 68) Unexpected token "if" at test/fixtures/fixtures/canonical/effects.lys:14:2 │ - 17│ a / b + 14│ if (b == 0) { - │ ^ + │ ^^ - 74) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:17:4 + 69) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:4 │ - 17│ a / b + 14│ if (b == 0) { │ ^ - 75) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:0 + 70) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:14:5 │ - 17│ a / b + 14│ if (b == 0) { - │ ^^^^ + │ ^ - 76) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:16:10 + 71) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:14:6 + │ + 14│ if (b == 0) { + + │ ^ - 77) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:16:9 + 72) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:7 │ - 16│ } else { + 14│ if (b == 0) { - │ ^ + │ ^ - 78) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:8 + 73) Unexpected token "==" at test/fixtures/fixtures/canonical/effects.lys:14:8 │ - 16│ } else { + 14│ if (b == 0) { - │ ^ + │ ^^ - 79) Unexpected token "else" at test/fixtures/fixtures/canonical/effects.lys:16:4 + 74) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:10 │ - 16│ } else { + 14│ if (b == 0) { - │ ^^^^ + │ ^ - 80) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:3 + 75) Unexpected token "0" at test/fixtures/fixtures/canonical/effects.lys:14:11 │ - 16│ } else { + 14│ if (b == 0) { - │ ^ + │ ^ - 81) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:16:2 + 76) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:14:12 │ - 16│ } else { + 14│ if (b == 0) { - │ ^ + │ ^ - 82) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:0 + 77) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:13 │ - 16│ } else { + 14│ if (b == 0) { - │ ^^ + │ ^ - 83) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:15:11 + 78) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:14:14 + │ + 14│ if (b == 0) { + + │ ^ + + 79) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:14:15 - 84) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:15:10 + 80) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:15:0 │ 15│ raise() - │ ^ + │ ^^^^ - 85) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:15:9 + 81) Unexpected token "raise" at test/fixtures/fixtures/canonical/effects.lys:15:4 │ 15│ raise() - │ ^ + │ ^^^^^ - 86) Unexpected token "raise" at test/fixtures/fixtures/canonical/effects.lys:15:4 + 82) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:15:9 │ 15│ raise() - │ ^^^^^ + │ ^ - 87) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:15:0 + 83) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:15:10 │ 15│ raise() - │ ^^^^ + │ ^ - 88) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:14:15 + 84) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:15:11 - 89) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:14:14 + 85) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:0 │ - 14│ if (b == 0) { + 16│ } else { - │ ^ + │ ^^ - 90) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:13 + 86) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:16:2 │ - 14│ if (b == 0) { + 16│ } else { - │ ^ + │ ^ - 91) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:14:12 + 87) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:3 │ - 14│ if (b == 0) { + 16│ } else { - │ ^ + │ ^ - 92) Unexpected token "0" at test/fixtures/fixtures/canonical/effects.lys:14:11 + 88) Unexpected token "else" at test/fixtures/fixtures/canonical/effects.lys:16:4 │ - 14│ if (b == 0) { + 16│ } else { - │ ^ + │ ^^^^ - 93) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:10 + 89) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:16:8 │ - 14│ if (b == 0) { + 16│ } else { - │ ^ + │ ^ - 94) Unexpected token "==" at test/fixtures/fixtures/canonical/effects.lys:14:8 + 90) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:16:9 │ - 14│ if (b == 0) { + 16│ } else { - │ ^^ + │ ^ - 95) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:7 + 91) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:16:10 + + 92) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:0 │ - 14│ if (b == 0) { + 17│ a / b - │ ^ + │ ^^^^ - 96) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:14:6 + 93) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:17:4 │ - 14│ if (b == 0) { + 17│ a / b - │ ^ + │ ^ - 97) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:14:5 + 94) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:5 │ - 14│ if (b == 0) { + 17│ a / b │ ^ - 98) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:4 + 95) Unexpected token "/" at test/fixtures/fixtures/canonical/effects.lys:17:6 │ - 14│ if (b == 0) { + 17│ a / b - │ ^ + │ ^ - 99) Unexpected token "if" at test/fixtures/fixtures/canonical/effects.lys:14:2 + 96) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:17:7 │ - 14│ if (b == 0) { + 17│ a / b - │ ^^ + │ ^ - 100) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:14:0 + 97) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:17:8 │ - 14│ if (b == 0) { + 17│ a / b - │ ^^ + │ ^ - 101) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:13:41 + 98) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:17:9 - 102) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:13:40 + 99) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:18:0 │ - 13│ fun safeDiv(a: T, b: T): T = { + 18│ } - │ ^ + │ ^^ - 103) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:39 + 100) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:18:2 │ - 13│ fun safeDiv(a: T, b: T): T = { - - │ ^ + 18│ } - 104) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:13:38 - │ - 13│ fun safeDiv(a: T, b: T): T = { + │ ^ - │ ^ + 101) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:18:3 - 105) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:37 + 102) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:19:0 │ - 13│ fun safeDiv(a: T, b: T): T = { + 19│ } - │ ^ + │ ^ - 106) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:36 - │ - 13│ fun safeDiv(a: T, b: T): T = { + 103) Unexpected token " - │ ^ +" at test/fixtures/fixtures/canonical/effects.lys:19:1 - 107) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:35 + 104) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:21:0 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^^^ - 108) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:13:34 + 105) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:3 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 109) Unexpected token "_" at test/fixtures/fixtures/canonical/effects.lys:13:33 + 106) Unexpected token "zeroDiv" at test/fixtures/fixtures/canonical/effects.lys:21:4 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^^^^^^^ - 110) Unexpected token "|" at test/fixtures/fixtures/canonical/effects.lys:13:32 + 107) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:21:11 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 111) Unexpected token "exn" at test/fixtures/fixtures/canonical/effects.lys:13:29 + 108) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:21:12 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^^^ + │ ^ - 112) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:13:28 + 109) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:13 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 113) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:27 + 110) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:14 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 114) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:26 + 111) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:15 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^^^ - 115) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:13:25 + 112) Unexpected token "," at test/fixtures/fixtures/canonical/effects.lys:21:18 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 116) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:24 + 113) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:19 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 117) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:23 + 114) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:21:20 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 118) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:22 + 115) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:21 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 119) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:13:21 + 116) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:22 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 120) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:20 + 117) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:23 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^^^ - 121) Unexpected token "," at test/fixtures/fixtures/canonical/effects.lys:13:19 + 118) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:21:26 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 122) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:18 + 119) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:21:27 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 123) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:17 + 120) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:28 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 124) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:13:16 + 121) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:21:29 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 125) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:13:15 + 122) Unexpected token "_" at test/fixtures/fixtures/canonical/effects.lys:21:30 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 126) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:13:14 + 123) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:21:31 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 127) Unexpected token ">" at test/fixtures/fixtures/canonical/effects.lys:13:13 + 124) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:32 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 128) Unexpected token "T" at test/fixtures/fixtures/canonical/effects.lys:13:12 + 125) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:21:33 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^^^ - 129) Unexpected token "<" at test/fixtures/fixtures/canonical/effects.lys:13:11 + 126) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:36 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 130) Unexpected token "safeDiv" at test/fixtures/fixtures/canonical/effects.lys:13:4 + 127) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:21:37 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^^^^^^^ + │ ^ - 131) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:13:3 + 128) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:21:38 │ - 13│ fun safeDiv(a: T, b: T): T = { + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - │ ^ + │ ^ - 132) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:13:0 + 129) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:21:39 │ - 13│ fun safeDiv(a: T, b: T): T = { - - │ ^^^ + 21│ fun zeroDiv(a: i32, b: i32): <_> i32 = { - 133) Unexpected token " + │ ^ -" at test/fixtures/fixtures/canonical/effects.lys:11:28 + 130) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:21:40 - 134) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:27 + 131) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:0 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^^ - 135) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:26 + 132) Unexpected token "if" at test/fixtures/fixtures/canonical/effects.lys:22:2 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^^ - 136) Unexpected token "*" at test/fixtures/fixtures/canonical/effects.lys:11:25 + 133) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:4 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 137) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:24 + 134) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:22:5 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 138) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:23 + 135) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:22:6 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 139) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:22 + 136) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:7 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 140) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:11:21 + 137) Unexpected token "==" at test/fixtures/fixtures/canonical/effects.lys:22:8 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^^ - 141) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:20 + 138) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:10 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 142) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:11:17 + 139) Unexpected token "0" at test/fixtures/fixtures/canonical/effects.lys:22:11 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^^^ + │ ^ - 143) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:16 + 140) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:22:12 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 144) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:11:15 + 141) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:22:13 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { - │ ^ + │ ^ - 145) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:11:14 + 142) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:22:14 │ - 11│ fun sqr(x: i32): i32 = x * x + 22│ if (b == 0) { │ ^ - 146) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:11:11 + 143) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:22:15 + + 144) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:23:0 │ - 11│ fun sqr(x: i32): i32 = x * x + 23│ raise() - │ ^^^ + │ ^^^^ - 147) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:10 + 145) Unexpected token "raise" at test/fixtures/fixtures/canonical/effects.lys:23:4 │ - 11│ fun sqr(x: i32): i32 = x * x + 23│ raise() - │ ^ + │ ^^^^^ - 148) Unexpected token ":" at test/fixtures/fixtures/canonical/effects.lys:11:9 + 146) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:23:9 │ - 11│ fun sqr(x: i32): i32 = x * x + 23│ raise() │ ^ - 149) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:11:8 + 147) Unexpected token ")" at test/fixtures/fixtures/canonical/effects.lys:23:10 │ - 11│ fun sqr(x: i32): i32 = x * x + 23│ raise() - │ ^ + │ ^ - 150) Unexpected token "(" at test/fixtures/fixtures/canonical/effects.lys:11:7 + 148) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:23:11 + + 149) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:0 │ - 11│ fun sqr(x: i32): i32 = x * x + 24│ } else { - │ ^ + │ ^^ - 151) Unexpected token "sqr" at test/fixtures/fixtures/canonical/effects.lys:11:4 + 150) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:24:2 │ - 11│ fun sqr(x: i32): i32 = x * x + 24│ } else { - │ ^^^ + │ ^ - 152) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:11:3 + 151) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:3 │ - 11│ fun sqr(x: i32): i32 = x * x + 24│ } else { │ ^ - 153) Unexpected token "fun" at test/fixtures/fixtures/canonical/effects.lys:11:0 + 152) Unexpected token "else" at test/fixtures/fixtures/canonical/effects.lys:24:4 │ - 11│ fun sqr(x: i32): i32 = x * x - - │ ^^^ + 24│ } else { - 154) Unexpected token " -" at test/fixtures/fixtures/canonical/effects.lys:10:31 + │ ^^^^ - 155) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:10:30 + 153) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:24:8 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 24│ } else { - │ ^ + │ ^ - 156) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:29 + 154) Unexpected token "{" at test/fixtures/fixtures/canonical/effects.lys:24:9 │ - 10│ fun sqr(x: i32): <> i32 = x * x - - │ ^ + 24│ } else { - 157) Unexpected token "*" at test/fixtures/fixtures/canonical/effects.lys:10:28 - │ - 10│ fun sqr(x: i32): <> i32 = x * x + │ ^ - │ ^ + 155) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:24:10 - 158) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:27 + 156) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:0 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 25│ a / b - │ ^ + │ ^^^^ - 159) Unexpected token "x" at test/fixtures/fixtures/canonical/effects.lys:10:26 + 157) Unexpected token "a" at test/fixtures/fixtures/canonical/effects.lys:25:4 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 25│ a / b - │ ^ + │ ^ - 160) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:25 + 158) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:5 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 25│ a / b - │ ^ + │ ^ - 161) Unexpected token "=" at test/fixtures/fixtures/canonical/effects.lys:10:24 + 159) Unexpected token "/" at test/fixtures/fixtures/canonical/effects.lys:25:6 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 25│ a / b - │ ^ + │ ^ - 162) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:23 + 160) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:25:7 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 25│ a / b - │ ^ + │ ^ - 163) Unexpected token "i32" at test/fixtures/fixtures/canonical/effects.lys:10:20 + 161) Unexpected token "b" at test/fixtures/fixtures/canonical/effects.lys:25:8 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 25│ a / b - │ ^^^ + │ ^ + + 162) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:25:9 - 164) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:10:19 + 163) Unexpected token " " at test/fixtures/fixtures/canonical/effects.lys:26:0 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 26│ } - │ ^ + │ ^^ - 165) Unexpected token "<>" at test/fixtures/fixtures/canonical/effects.lys:10:17 + 164) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:26:2 │ - 10│ fun sqr(x: i32): <> i32 = x * x + 26│ } - │ ^^ + │ ^ - 166) A type or effect was expected at test/fixtures/fixtures/canonical/effects.lys:10:16 - │ - 10│ fun sqr(x: i32): <> i32 = x * x + 165) Unexpected token " +" at test/fixtures/fixtures/canonical/effects.lys:26:3 - │ ^ + 166) Unexpected token "}" at test/fixtures/fixtures/canonical/effects.lys:27:0 + │ + 27│ } + │ ^ diff --git a/test/fixtures/fixtures/parser-error/b.lys.syntax-error b/test/fixtures/fixtures/parser-error/b.lys.syntax-error index 119d0ae..0a9ff0f 100644 --- a/test/fixtures/fixtures/parser-error/b.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/b.lys.syntax-error @@ -1,45 +1,45 @@ - 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/b.lys:1:34 + 1) Unexpected token "asd" at test/fixtures/fixtures/parser-error/b.lys:1:22 │ 1│ private struct Entity asd val x = 1 - │ ^ + │ ^^^ - 2) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:33 + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:25 │ 1│ private struct Entity asd val x = 1 - │ ^ + │ ^ - 3) Unexpected token "=" at test/fixtures/fixtures/parser-error/b.lys:1:32 + 3) Unexpected token "val" at test/fixtures/fixtures/parser-error/b.lys:1:26 │ 1│ private struct Entity asd val x = 1 - │ ^ + │ ^^^ - 4) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:31 + 4) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:29 │ 1│ private struct Entity asd val x = 1 - │ ^ + │ ^ 5) Unexpected token "x" at test/fixtures/fixtures/parser-error/b.lys:1:30 │ 1│ private struct Entity asd val x = 1 │ ^ - 6) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:29 + 6) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:31 │ 1│ private struct Entity asd val x = 1 - │ ^ + │ ^ - 7) Unexpected token "val" at test/fixtures/fixtures/parser-error/b.lys:1:26 + 7) Unexpected token "=" at test/fixtures/fixtures/parser-error/b.lys:1:32 │ 1│ private struct Entity asd val x = 1 - │ ^^^ + │ ^ - 8) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:25 + 8) Unexpected token " " at test/fixtures/fixtures/parser-error/b.lys:1:33 │ 1│ private struct Entity asd val x = 1 - │ ^ + │ ^ - 9) Unexpected token "asd" at test/fixtures/fixtures/parser-error/b.lys:1:22 + 9) Unexpected token "1" at test/fixtures/fixtures/parser-error/b.lys:1:34 │ 1│ private struct Entity asd val x = 1 - │ ^^^ + │ ^ diff --git a/test/fixtures/fixtures/parser-error/d.lys.syntax-error b/test/fixtures/fixtures/parser-error/d.lys.syntax-error index 5a7c80c..bf1f0ad 100644 --- a/test/fixtures/fixtures/parser-error/d.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/d.lys.syntax-error @@ -1,45 +1,45 @@ - 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/d.lys:1:26 + 1) Unexpected token "asd" at test/fixtures/fixtures/parser-error/d.lys:1:14 │ 1│ struct Entity asd val x = 1 - │ ^ + │ ^^^ - 2) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:25 + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:17 │ 1│ struct Entity asd val x = 1 - │ ^ + │ ^ - 3) Unexpected token "=" at test/fixtures/fixtures/parser-error/d.lys:1:24 + 3) Unexpected token "val" at test/fixtures/fixtures/parser-error/d.lys:1:18 │ 1│ struct Entity asd val x = 1 - │ ^ + │ ^^^ - 4) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:23 + 4) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:21 │ 1│ struct Entity asd val x = 1 - │ ^ + │ ^ 5) Unexpected token "x" at test/fixtures/fixtures/parser-error/d.lys:1:22 │ 1│ struct Entity asd val x = 1 │ ^ - 6) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:21 + 6) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:23 │ 1│ struct Entity asd val x = 1 - │ ^ + │ ^ - 7) Unexpected token "val" at test/fixtures/fixtures/parser-error/d.lys:1:18 + 7) Unexpected token "=" at test/fixtures/fixtures/parser-error/d.lys:1:24 │ 1│ struct Entity asd val x = 1 - │ ^^^ + │ ^ - 8) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:17 + 8) Unexpected token " " at test/fixtures/fixtures/parser-error/d.lys:1:25 │ 1│ struct Entity asd val x = 1 - │ ^ + │ ^ - 9) Unexpected token "asd" at test/fixtures/fixtures/parser-error/d.lys:1:14 + 9) Unexpected token "1" at test/fixtures/fixtures/parser-error/d.lys:1:26 │ 1│ struct Entity asd val x = 1 - │ ^^^ + │ ^ diff --git a/test/fixtures/fixtures/parser-error/h.lys.syntax-error b/test/fixtures/fixtures/parser-error/h.lys.syntax-error index a301727..df94ed7 100644 --- a/test/fixtures/fixtures/parser-error/h.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/h.lys.syntax-error @@ -1,10 +1,10 @@ - 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/h.lys:1:20 + 1) A type or effect was expected at test/fixtures/fixtures/parser-error/h.lys:1:19 │ 1│ private fun test(a: 1) = 2 - │ ^ + │ ^ - 2) A type or effect was expected at test/fixtures/fixtures/parser-error/h.lys:1:19 + 2) Unexpected token "1" at test/fixtures/fixtures/parser-error/h.lys:1:20 │ 1│ private fun test(a: 1) = 2 - │ ^ + │ ^ diff --git a/test/fixtures/fixtures/parser-error/j.lys.syntax-error b/test/fixtures/fixtures/parser-error/j.lys.syntax-error index 3e0b63c..976af5c 100644 --- a/test/fixtures/fixtures/parser-error/j.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/j.lys.syntax-error @@ -1,15 +1,15 @@ - 1) Unexpected token "0" at test/fixtures/fixtures/parser-error/j.lys:1:9 + 1) A value was expected. at test/fixtures/fixtures/parser-error/j.lys:1:8 │ 1│ var a = .0 - │ ^ + │ ^ 2) Unexpected token "." at test/fixtures/fixtures/parser-error/j.lys:1:8 │ 1│ var a = .0 │ ^ - 3) A value was expected. at test/fixtures/fixtures/parser-error/j.lys:1:8 + 3) Unexpected token "0" at test/fixtures/fixtures/parser-error/j.lys:1:9 │ 1│ var a = .0 - │ ^ + │ ^ diff --git a/test/fixtures/fixtures/parser-error/k.lys.syntax-error b/test/fixtures/fixtures/parser-error/k.lys.syntax-error index dcd7e19..fc267df 100644 --- a/test/fixtures/fixtures/parser-error/k.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/k.lys.syntax-error @@ -1,25 +1,25 @@ - 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/k.lys:1:29 + 1) Unexpected token "else" at test/fixtures/fixtures/parser-error/k.lys:1:18 │ 1│ var a = match x { else } map 1 - │ ^ + │ ^^^^ - 2) Unexpected token " " at test/fixtures/fixtures/parser-error/k.lys:1:28 + 2) Unexpected token " " at test/fixtures/fixtures/parser-error/k.lys:1:22 │ 1│ var a = match x { else } map 1 - │ ^ + │ ^ 3) Unexpected token "map" at test/fixtures/fixtures/parser-error/k.lys:1:25 │ 1│ var a = match x { else } map 1 │ ^^^ - 4) Unexpected token " " at test/fixtures/fixtures/parser-error/k.lys:1:22 + 4) Unexpected token " " at test/fixtures/fixtures/parser-error/k.lys:1:28 │ 1│ var a = match x { else } map 1 - │ ^ + │ ^ - 5) Unexpected token "else" at test/fixtures/fixtures/parser-error/k.lys:1:18 + 5) Unexpected token "1" at test/fixtures/fixtures/parser-error/k.lys:1:29 │ 1│ var a = match x { else } map 1 - │ ^^^^ + │ ^ diff --git a/test/fixtures/fixtures/parser-error/l.lys.syntax-error b/test/fixtures/fixtures/parser-error/l.lys.syntax-error index 946a396..40089c3 100644 --- a/test/fixtures/fixtures/parser-error/l.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/l.lys.syntax-error @@ -1,20 +1,20 @@ - 1) Unexpected token "1" at test/fixtures/fixtures/parser-error/l.lys:1:32 + 1) An expression was expected at test/fixtures/fixtures/parser-error/l.lys:1:26 │ 1│ var a = match x { else -> } map 1 - │ ^ + │ ^ - 2) Unexpected token " " at test/fixtures/fixtures/parser-error/l.lys:1:31 + 2) Unexpected token "map" at test/fixtures/fixtures/parser-error/l.lys:1:28 │ 1│ var a = match x { else -> } map 1 - │ ^ + │ ^^^ - 3) Unexpected token "map" at test/fixtures/fixtures/parser-error/l.lys:1:28 + 3) Unexpected token " " at test/fixtures/fixtures/parser-error/l.lys:1:31 │ 1│ var a = match x { else -> } map 1 - │ ^^^ + │ ^ - 4) An expression was expected at test/fixtures/fixtures/parser-error/l.lys:1:26 + 4) Unexpected token "1" at test/fixtures/fixtures/parser-error/l.lys:1:32 │ 1│ var a = match x { else -> } map 1 - │ ^ + │ ^ diff --git a/test/fixtures/fixtures/parser-error/o.lys.syntax-error b/test/fixtures/fixtures/parser-error/o.lys.syntax-error index f4865ce..cb0d47f 100644 --- a/test/fixtures/fixtures/parser-error/o.lys.syntax-error +++ b/test/fixtures/fixtures/parser-error/o.lys.syntax-error @@ -1,9 +1,9 @@ - 1) Unexpected token "match" at test/fixtures/fixtures/parser-error/o.lys:1:8 + 1) A value was expected. at test/fixtures/fixtures/parser-error/o.lys:1:8 │ 1│ var a = match │ ^^^^^ - 2) A value was expected. at test/fixtures/fixtures/parser-error/o.lys:1:8 + 2) Unexpected token "match" at test/fixtures/fixtures/parser-error/o.lys:1:8 │ 1│ var a = match │ ^^^^^ diff --git a/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error b/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error index ffe5f04..f025c60 100644 --- a/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error +++ b/test/fixtures/fixtures/sugar/enum-temperature.lys.syntax-error @@ -1,36 +1,36 @@ - 1) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys:14:28 + 1) Unexpected token "temperature" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:14 │ - 14│ Celcius.is(x) || Kelvin.is(x) + 2│ Celcius(mut temperature: f32) - │ ^^ + │ ^^^^^^^^^^^ - 2) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys:14:12 + 2) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:25 │ - 14│ Celcius.is(x) || Kelvin.is(x) + 2│ Celcius(mut temperature: f32) - │ ^^ + │ ^ - 3) Unexpected token "f32" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:27 + 3) Unexpected token " " at test/fixtures/fixtures/sugar/enum-temperature.lys:2:26 │ 2│ Celcius(mut temperature: f32) - │ ^^^ + │ ^ - 4) Unexpected token " " at test/fixtures/fixtures/sugar/enum-temperature.lys:2:26 + 4) Unexpected token "f32" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:27 │ 2│ Celcius(mut temperature: f32) - │ ^ + │ ^^^ - 5) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:25 + 5) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys:14:12 │ - 2│ Celcius(mut temperature: f32) + 14│ Celcius.is(x) || Kelvin.is(x) - │ ^ + │ ^^ - 6) Unexpected token "temperature" at test/fixtures/fixtures/sugar/enum-temperature.lys:2:14 + 6) A name identifier was expected here at test/fixtures/fixtures/sugar/enum-temperature.lys:14:28 │ - 2│ Celcius(mut temperature: f32) + 14│ Celcius.is(x) || Kelvin.is(x) - │ ^^^^^^^^^^^ + │ ^^ diff --git a/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error b/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error index ecab8ca..00c6ef4 100644 --- a/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error +++ b/test/fixtures/fixtures/sugar/enum-unary.lys.syntax-error @@ -1,2724 +1,2724 @@ - 1) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:57:1 - - 2) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:57:0 + 1) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:12:0 │ - 57│ } - - │ ^ + 12│ impl Option { - 3) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:56:47 + │ ^^^^ - 4) Unexpected token "false" at test/fixtures/fixtures/sugar/enum-unary.lys:56:42 + 2) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:12:4 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^^^^^ + │ ^ - 5) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:41 + 3) Unexpected token "Option" at test/fixtures/fixtures/sugar/enum-unary.lys:12:5 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^ + │ ^^^^^^ - 6) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:56:40 + 4) Unexpected token "<" at test/fixtures/fixtures/sugar/enum-unary.lys:12:11 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^ + │ ^ - 7) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:39 + 5) Unexpected token "T" at test/fixtures/fixtures/sugar/enum-unary.lys:12:12 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^ + │ ^ - 8) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:56:32 + 6) Unexpected token ">" at test/fixtures/fixtures/sugar/enum-unary.lys:12:13 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^^^^^^^ + │ ^ - 9) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:31 + 7) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:12:14 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^ + │ ^ - 10) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:30 + 8) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:12:15 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 12│ impl Option { - │ ^ + │ ^ - 11) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:56:29 + 9) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:12:16 + + 10) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:0 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^^ - 12) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:56:25 + 11) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:13:2 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^^^^ + │ ^^^ - 13) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:24 + 12) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:5 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^ - 14) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:23 + 13) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:13:6 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^^ - 15) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:56:20 + 14) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:13:8 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^^^ + │ ^ - 16) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:19 + 15) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:13:9 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^ - 17) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:56:18 + 16) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:13:10 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^ - 18) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:56:14 + 17) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:11 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^^^^ + │ ^ - 19) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:13 + 18) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:13:12 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^^^ - 20) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:12 + 19) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:13:15 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^ - 21) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:56:9 + 20) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:16 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^^^ + │ ^ - 22) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:56:8 + 21) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:13:17 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^ - 23) Unexpected token "!=" at test/fixtures/fixtures/sugar/enum-unary.lys:56:6 + 22) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:18 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^^ + │ ^ - 24) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:5 + 23) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:13:19 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 13│ fun is(x: ref) = { - │ ^ + │ ^ + + 24) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:13:20 - 25) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:56:2 + 25) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:0 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false + 14│ Some.is(x) || None.is(x) - │ ^^^ + │ ^^^^ - 26) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:0 + 26) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:14:4 │ - 56│ fun !=(lhs: None, rhs: None): boolean = false - - │ ^^ + 14│ Some.is(x) || None.is(x) - 27) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:55:46 + │ ^^^^ - 28) Unexpected token "true" at test/fixtures/fixtures/sugar/enum-unary.lys:55:42 + 27) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:14:8 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^^^^ + │ ^ - 29) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:41 + 28) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:14:9 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^^ - 30) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:55:40 + 29) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:14:11 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ - 31) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:39 + 30) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:14:12 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ - 32) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:55:32 + 31) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:14:13 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^^^^^^^ + │ ^ - 33) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:31 + 32) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:14 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ - 34) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:30 + 33) Unexpected token "||" at test/fixtures/fixtures/sugar/enum-unary.lys:14:15 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^^ - 35) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:55:29 + 34) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:17 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ - 36) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:55:25 + 35) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:14:18 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^^^^ + │ ^^^^ - 37) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:24 + 36) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:14:22 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ - 38) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:23 + 37) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:14:23 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^^ - 39) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:55:20 + 38) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:14:25 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^^^ + │ ^ - 40) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:19 + 39) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:14:26 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ - 41) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:55:18 + 40) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:14:27 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 14│ Some.is(x) || None.is(x) - │ ^ + │ ^ + + 41) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:14:28 - 42) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:55:14 + 42) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:15:0 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 15│ } - │ ^^^^ + │ ^^ - 43) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:13 + 43) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:15:2 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 15│ } - │ ^ + │ ^ - 44) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:12 + 44) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:15:3 + + 45) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:16:0 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 16│ } - │ ^ + │ ^ - 45) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:55:9 - │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 46) Unexpected token " - │ ^^^ +" at test/fixtures/fixtures/sugar/enum-unary.lys:16:1 - 46) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:55:8 + 47) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:18:0 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 18│ impl Some { - │ ^ + │ ^^^^ - 47) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:55:6 + 48) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:18:4 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 18│ impl Some { - │ ^^ + │ ^ - 48) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:5 + 49) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:18:5 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 18│ impl Some { - │ ^ + │ ^^^^ - 49) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:55:2 + 50) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:18:9 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 18│ impl Some { - │ ^^^ + │ ^ - 50) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:0 + 51) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:18:10 │ - 55│ fun ==(lhs: None, rhs: None): boolean = true + 18│ impl Some { - │ ^^ + │ ^ - 51) Unexpected token " + 52) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:18:11 -" at test/fixtures/fixtures/sugar/enum-unary.lys:53:36 + 53) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:0 + │ + 19│ val determinant: u32 = 1 + + │ ^^ - 52) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:53:22 + 54) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:19:2 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^^^^^^^^^^^^^^ + │ ^^^ - 53) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:21 + 55) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:5 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^ - 54) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:53:20 + 56) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:19:6 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^^^^^^^^^^^ - 55) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:19 + 57) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:19:17 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^ - 56) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:53:15 + 58) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:18 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^^^^ + │ ^ - 57) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:14 + 59) Unexpected token "u32" at test/fixtures/fixtures/sugar/enum-unary.lys:19:19 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^^^ - 58) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:53:13 + 60) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:22 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^ - 59) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:53:12 + 61) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:19:23 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^ - 60) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:53:11 + 62) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:24 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^ + │ ^ - 61) Unexpected token "apply" at test/fixtures/fixtures/sugar/enum-unary.lys:53:6 + 63) Unexpected token "1" at test/fixtures/fixtures/sugar/enum-unary.lys:19:25 │ - 53│ fun apply(): None = staticInstance + 19│ val determinant: u32 = 1 - │ ^^^^^ + │ ^ - 62) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:5 + 64) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:19:26 + + 65) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:0 │ - 53│ fun apply(): None = staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^^ - 63) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:53:2 + 66) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:20:2 │ - 53│ fun apply(): None = staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ │ ^^^ - 64) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:0 + 67) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:5 │ - 53│ fun apply(): None = staticInstance - - │ ^^ - - 65) Unexpected token " + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ -" at test/fixtures/fixtures/sugar/enum-unary.lys:51:38 + │ ^ - 66) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:51:24 + 68) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:6 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^^^^^^^^^^^^^^ + │ ^^^^^^^^^^ - 67) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:23 + 69) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:16 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 68) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:51:21 + 70) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:20:17 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^^ + │ ^ - 69) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:20 + 71) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:18 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 70) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:51:19 + 72) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:20:19 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^^^ - 71) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:18 + 73) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:20:22 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 72) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:51:17 + 74) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:23 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^^^^^^^^^^ - 73) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:16 + 75) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:33 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 74) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:51:15 + 76) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:20:34 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 75) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:51:12 + 77) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:35 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^^^ + │ ^ - 76) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:11 + 78) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:20:36 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^^^ - 77) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:51:10 + 79) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:20:39 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 78) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:51:9 + 80) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:40 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^^^^^^^^^^ - 79) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:51:8 + 81) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:50 │ - 51│ fun is(x: ref) = x == staticInstance + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - │ ^ + │ ^ - 80) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:51:6 + 82) Unexpected token "/* value: ref */" at test/fixtures/fixtures/sugar/enum-unary.lys:20:51 │ - 51│ fun is(x: ref) = x == staticInstance - - │ ^^ + 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ - 81) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:5 - │ - 51│ fun is(x: ref) = x == staticInstance + │ ^^^^^^^^^^^^^^^^ - │ ^ + 83) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:20:67 - 82) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:51:2 + 84) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:0 │ - 51│ fun is(x: ref) = x == staticInstance + 21│ fun is(x: ref) = x.determinant == determinant - │ ^^^ + │ ^^ - 83) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:0 + 85) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:21:2 │ - 51│ fun is(x: ref) = x == staticInstance - - │ ^^ + 21│ fun is(x: ref) = x.determinant == determinant - 84) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:50:39 + │ ^^^ - 85) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:50:28 + 86) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:5 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^^^^^^^^^^^ + │ ^ - 86) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:27 + 87) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:21:6 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^^ - 87) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:50:26 + 88) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:21:8 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 88) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:25 + 89) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:21:9 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 89) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:50:22 + 90) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:21:10 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^^^ + │ ^ - 90) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:21 + 91) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:11 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 91) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:50:20 + 92) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:21:12 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^^^ - 92) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:50:6 + 93) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:21:15 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^^^^^^^^^^^^^^ + │ ^ - 93) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:5 + 94) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:16 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 94) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:50:2 + 95) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:21:17 │ - 50│ val staticInstance: ref = determinant + 21│ fun is(x: ref) = x.determinant == determinant - │ ^^^ + │ ^ - 95) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:0 + 96) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:18 │ - 50│ val staticInstance: ref = determinant - - │ ^^ + 21│ fun is(x: ref) = x.determinant == determinant - 96) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:49:26 + │ ^ - 97) Unexpected token "2" at test/fixtures/fixtures/sugar/enum-unary.lys:49:25 + 97) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:21:19 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 98) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:24 + 98) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:21:20 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 99) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:49:23 + 99) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:21:21 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^^^^^^^^^^^ - 100) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:22 + 100) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:32 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 101) Unexpected token "u32" at test/fixtures/fixtures/sugar/enum-unary.lys:49:19 + 101) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:21:33 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^^^ + │ ^^ - 102) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:18 + 102) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:35 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^ - 103) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:49:17 + 103) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:21:36 │ - 49│ val determinant: u32 = 2 + 21│ fun is(x: ref) = x.determinant == determinant - │ ^ + │ ^^^^^^^^^^^ - 104) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:49:6 - │ - 49│ val determinant: u32 = 2 + 104) Unexpected token " - │ ^^^^^^^^^^^ +" at test/fixtures/fixtures/sugar/enum-unary.lys:21:47 - 105) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:5 + 105) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:0 │ - 49│ val determinant: u32 = 2 + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^^ - 106) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:49:2 + 106) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:23:2 │ - 49│ val determinant: u32 = 2 + 23│ fun apply(value: ref): Some = { │ ^^^ - 107) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:0 + 107) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:5 │ - 49│ val determinant: u32 = 2 - - │ ^^ + 23│ fun apply(value: ref): Some = { - 108) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:48:11 + │ ^ - 109) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:48:10 + 108) Unexpected token "apply" at test/fixtures/fixtures/sugar/enum-unary.lys:23:6 │ - 48│ impl None { + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^^^^^ - 110) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:48:9 + 109) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:23:11 │ - 48│ impl None { + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^ - 111) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:48:5 + 110) Unexpected token "value" at test/fixtures/fixtures/sugar/enum-unary.lys:23:12 │ - 48│ impl None { + 23│ fun apply(value: ref): Some = { - │ ^^^^ + │ ^^^^^ - 112) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:48:4 + 111) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:23:17 │ - 48│ impl None { + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^ - 113) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:48:0 + 112) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:18 │ - 48│ impl None { - - │ ^^^^ - - 114) Unexpected token " + 23│ fun apply(value: ref): Some = { -" at test/fixtures/fixtures/sugar/enum-unary.lys:46:1 + │ ^ - 115) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:46:0 + 113) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:23:19 │ - 46│ } - - │ ^ + 23│ fun apply(value: ref): Some = { - 116) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:45:3 + │ ^^^ - 117) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:45:2 + 114) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:23:22 │ - 45│ } + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^ - 118) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:45:0 + 115) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:23:23 │ - 45│ } - - │ ^^ + 23│ fun apply(value: ref): Some = { - 119) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:44:17 + │ ^ - 120) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:44:16 + 116) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:24 │ - 44│ !(lhs == rhs) + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^ - 121) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:44:13 + 117) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:23:25 │ - 44│ !(lhs == rhs) + 23│ fun apply(value: ref): Some = { - │ ^^^ + │ ^^^^ - 122) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:12 + 118) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:29 │ - 44│ !(lhs == rhs) + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^ - 123) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:44:10 + 119) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:23:30 │ - 44│ !(lhs == rhs) + 23│ fun apply(value: ref): Some = { - │ ^^ + │ ^ - 124) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:9 + 120) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:31 │ - 44│ !(lhs == rhs) + 23│ fun apply(value: ref): Some = { - │ ^ + │ ^ - 125) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:44:6 + 121) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:23:32 │ - 44│ !(lhs == rhs) + 23│ fun apply(value: ref): Some = { - │ ^^^ + │ ^ - 126) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:44:5 + 122) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:23:33 + + 123) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:0 │ - 44│ !(lhs == rhs) + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^^ - 127) Unexpected token "!" at test/fixtures/fixtures/sugar/enum-unary.lys:44:4 + 124) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:24:4 │ - 44│ !(lhs == rhs) + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^ - 128) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:0 + 125) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:7 │ - 44│ !(lhs == rhs) - - │ ^^^^ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - 129) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:43:43 + │ ^ - 130) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:43:42 + 126) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:24:8 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^ - 131) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:41 + 127) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:24:11 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 132) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:43:40 + 128) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:12 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 133) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:39 + 129) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:24:13 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^^ - 134) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:43:32 + 130) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:17 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^^^^^ + │ ^ - 135) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:31 + 131) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:24:18 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 136) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:30 + 132) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:19 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 137) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:43:29 + 133) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:24:20 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 138) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:43:25 + 134) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:24:21 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^^ + │ ^^^^^^^^^^^ - 139) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:24 + 135) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:32 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 140) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:23 + 136) Unexpected token "<<" at test/fixtures/fixtures/sugar/enum-unary.lys:24:33 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^ - 141) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:43:20 + 137) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:35 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^ + │ ^ - 142) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:19 + 138) Unexpected token "32" at test/fixtures/fixtures/sugar/enum-unary.lys:24:36 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^ - 143) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:43:18 + 139) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:38 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 144) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:43:14 + 140) Unexpected token "|" at test/fixtures/fixtures/sugar/enum-unary.lys:24:39 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^^ + │ ^ - 145) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:13 + 141) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:40 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 146) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:12 + 142) Unexpected token "core" at test/fixtures/fixtures/sugar/enum-unary.lys:24:41 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^^ - 147) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:43:9 + 143) Unexpected token "::" at test/fixtures/fixtures/sugar/enum-unary.lys:24:45 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^ + │ ^^ - 148) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:43:8 + 144) Unexpected token "memory" at test/fixtures/fixtures/sugar/enum-unary.lys:24:47 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^^^^ - 149) Unexpected token "!=" at test/fixtures/fixtures/sugar/enum-unary.lys:43:6 + 145) Unexpected token "::" at test/fixtures/fixtures/sugar/enum-unary.lys:24:53 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^ + │ ^^ - 150) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:5 + 146) Unexpected token "malloc" at test/fixtures/fixtures/sugar/enum-unary.lys:24:55 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^^^^ - 151) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:43:2 + 147) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:24:61 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^ + │ ^ - 152) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:0 + 148) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:24:62 │ - 43│ fun !=(lhs: Some, rhs: Some): boolean = { + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^ + │ ^^^^^^^^^^ - 153) Unexpected token " + 149) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:24:72 + │ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some -" at test/fixtures/fixtures/sugar/enum-unary.lys:41:3 + │ ^ - 154) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:41:2 + 150) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:24:73 │ - 41│ } + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^ - 155) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:41:0 + 151) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:74 │ - 41│ } - - │ ^^ + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - 156) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:40:36 + │ ^ - 157) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:40:35 + 152) Unexpected token "as" at test/fixtures/fixtures/sugar/enum-unary.lys:24:75 │ - 40│ get_value(lhs) == get_value(rhs) + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^ - 158) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:40:32 + 153) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:77 │ - 40│ get_value(lhs) == get_value(rhs) + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^^^ + │ ^ - 159) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:40:31 + 154) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:24:78 │ - 40│ get_value(lhs) == get_value(rhs) + 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - │ ^ + │ ^^^^ + + 155) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:24:82 - 160) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:40:22 + 156) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:25:0 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^^^^^^^^^ + │ ^^^^ - 161) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:21 + 157) Unexpected token "set_value" at test/fixtures/fixtures/sugar/enum-unary.lys:25:4 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^ + │ ^^^^^^^^^ - 162) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:40:19 + 158) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:25:13 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^^ + │ ^ - 163) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:18 + 159) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:25:14 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^ + │ ^^^ - 164) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:40:17 + 160) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:25:17 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) │ ^ - 165) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:40:14 + 161) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:25:18 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^^^ + │ ^ - 166) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:40:13 + 162) Unexpected token "value" at test/fixtures/fixtures/sugar/enum-unary.lys:25:19 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^ + │ ^^^^^ - 167) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:40:4 + 163) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:25:24 │ - 40│ get_value(lhs) == get_value(rhs) + 25│ set_value(ptr, value) - │ ^^^^^^^^^ + │ ^ + + 164) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:25:25 - 168) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:0 + 165) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:0 │ - 40│ get_value(lhs) == get_value(rhs) + 26│ ref as Celcius │ ^^^^ - 169) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:39:43 + 166) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:26:4 + │ + 26│ ref as Celcius + + │ ^^^ - 170) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:39:42 + 167) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:7 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 26│ ref as Celcius - │ ^ + │ ^ - 171) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:41 + 168) Unexpected token "as" at test/fixtures/fixtures/sugar/enum-unary.lys:26:8 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 26│ ref as Celcius - │ ^ + │ ^^ - 172) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:39:40 + 169) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:10 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 26│ ref as Celcius - │ ^ + │ ^ - 173) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:39 + 170) Unexpected token "Celcius" at test/fixtures/fixtures/sugar/enum-unary.lys:26:11 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 26│ ref as Celcius - │ ^ + │ ^^^^^^^ - 174) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:39:32 + 171) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:26:18 + + 172) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:27:0 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 27│ } - │ ^^^^^^^ + │ ^^ - 175) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:31 + 173) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:27:2 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 27│ } - │ ^ + │ ^ + + 174) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:27:3 - 176) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:30 + 175) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:0 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^^ - 177) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:39:29 + 176) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:29:2 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^^^ - 178) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:39:25 + 177) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:5 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^^^^ + │ ^ - 179) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:24 + 178) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:29:6 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^^^^^^^^^ - 180) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:23 + 179) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:29:15 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^ - 181) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:39:20 + 180) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:29:16 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^^^ + │ ^^^ - 182) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:19 + 181) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:29:19 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { │ ^ - 183) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:39:18 + 182) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:20 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^ - 184) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:39:14 + 183) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:29:21 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^^^^ + │ ^^^^ - 185) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:13 + 184) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:29:25 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^ - 186) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:12 + 185) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:29:26 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^ - 187) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:39:9 + 186) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:27 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^^^ + │ ^ - 188) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:39:8 + 187) Unexpected token "f32" at test/fixtures/fixtures/sugar/enum-unary.lys:29:28 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^^^ - 189) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:39:6 + 188) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:31 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^^ + │ ^ - 190) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:5 + 189) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:29:32 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^ + │ ^ - 191) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:39:2 + 190) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:33 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { + 29│ fun get_value(ptr: Some): f32 = { - │ ^^^ + │ ^ - 192) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:0 + 191) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:29:34 │ - 39│ fun ==(lhs: Some, rhs: Some): boolean = { - - │ ^^ + 29│ fun get_value(ptr: Some): f32 = { - 193) Unexpected token " + │ ^ -" at test/fixtures/fixtures/sugar/enum-unary.lys:37:3 + 192) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:29:35 - 194) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:37:2 + 193) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:0 │ - 37│ } + 30│ val base = ref.base(ptr) - │ ^ + │ ^^^^ - 195) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:37:0 + 194) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:30:4 │ - 37│ } - - │ ^^ + 30│ val base = ref.base(ptr) - 196) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:36:33 + │ ^^^ - 197) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:36:32 + 195) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:7 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^ - 198) Unexpected token "newValue" at test/fixtures/fixtures/sugar/enum-unary.lys:36:24 + 196) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:30:8 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^^^^^^^^ + │ ^^^^ - 199) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:23 + 197) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:12 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^ - 200) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:36:22 + 198) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:30:13 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^ - 201) Unexpected token "0" at test/fixtures/fixtures/sugar/enum-unary.lys:36:21 + 199) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:14 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^ - 202) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:20 + 200) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:30:15 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^^^ - 203) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:36:19 + 201) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:30:18 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^ - 204) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:18 + 202) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:30:19 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^^^^ - 205) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:36:14 + 203) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:30:23 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^^^^ + │ ^ - 206) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:36:13 + 204) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:30:24 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^ + │ ^^^ - 207) Unexpected token "store" at test/fixtures/fixtures/sugar/enum-unary.lys:36:8 + 205) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:30:27 │ - 36│ ref.store(base + 0, newValue) + 30│ val base = ref.base(ptr) - │ ^^^^^ + │ ^ - 208) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:36:7 + 206) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:30:28 + + 207) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:0 │ - 36│ ref.store(base + 0, newValue) + 31│ ref.read(base + 0) - │ ^ + │ ^^^^ - 209) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:36:4 + 208) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:31:4 │ - 36│ ref.store(base + 0, newValue) + 31│ ref.read(base + 0) │ ^^^ - 210) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:0 + 209) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:31:7 │ - 36│ ref.store(base + 0, newValue) - - │ ^^^^ + 31│ ref.read(base + 0) - 211) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:35:28 + │ ^ - 212) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:35:27 + 210) Unexpected token "read" at test/fixtures/fixtures/sugar/enum-unary.lys:31:8 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^ + │ ^^^^ - 213) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:35:24 + 211) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:31:12 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^^^ + │ ^ - 214) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:35:23 + 212) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:31:13 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^ + │ ^^^^ - 215) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:35:19 + 213) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:17 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^^^^ + │ ^ - 216) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:35:18 + 214) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:31:18 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) │ ^ - 217) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:35:15 + 215) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:19 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^^^ + │ ^ - 218) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:14 + 216) Unexpected token "0" at test/fixtures/fixtures/sugar/enum-unary.lys:31:20 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^ + │ ^ - 219) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:35:13 + 217) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:31:21 │ - 35│ val base = ref.base(ptr) + 31│ ref.read(base + 0) - │ ^ + │ ^ - 220) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:12 + 218) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:31:22 + + 219) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:32:0 │ - 35│ val base = ref.base(ptr) + 32│ } - │ ^ + │ ^^ - 221) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:35:8 + 220) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:32:2 │ - 35│ val base = ref.base(ptr) + 32│ } - │ ^^^^ + │ ^ - 222) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:7 - │ - 35│ val base = ref.base(ptr) + 221) Unexpected token " - │ ^ +" at test/fixtures/fixtures/sugar/enum-unary.lys:32:3 - 223) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:35:4 + 222) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:0 │ - 35│ val base = ref.base(ptr) + 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^ + │ ^^ - 224) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:0 + 223) Unexpected token "private" at test/fixtures/fixtures/sugar/enum-unary.lys:34:2 │ - 35│ val base = ref.base(ptr) - - │ ^^^^ + 34│ private fun set_value(ptr: Some, newValue: ref): void = { - 225) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:34:59 + │ ^^^^^^^ - 226) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:34:58 + 224) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:9 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 227) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:57 + 225) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:34:10 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^^^ - 228) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:34:56 + 226) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:13 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 229) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:55 + 227) Unexpected token "set_value" at test/fixtures/fixtures/sugar/enum-unary.lys:34:14 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^^^^^^^^^ - 230) Unexpected token "void" at test/fixtures/fixtures/sugar/enum-unary.lys:34:51 + 228) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:34:23 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^^ + │ ^ - 231) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:50 + 229) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:34:24 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^^^ - 232) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:49 + 230) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:27 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 233) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:34:48 + 231) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:28 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 234) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:34:45 + 232) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:34:29 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^ + │ ^^^^ - 235) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:44 + 233) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:34:33 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 236) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:43 + 234) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:34 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 237) Unexpected token "newValue" at test/fixtures/fixtures/sugar/enum-unary.lys:34:35 + 235) Unexpected token "newValue" at test/fixtures/fixtures/sugar/enum-unary.lys:34:35 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { │ ^^^^^^^^ - 238) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:34 + 236) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:43 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 239) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:34:33 + 237) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:44 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 240) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:34:29 + 238) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:34:45 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^^ + │ ^^^ - 241) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:28 + 239) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:34:48 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 242) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:27 + 240) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:34:49 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 243) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:34:24 + 241) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:50 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^ + │ ^ - 244) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:34:23 + 242) Unexpected token "void" at test/fixtures/fixtures/sugar/enum-unary.lys:34:51 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^^^^ - 245) Unexpected token "set_value" at test/fixtures/fixtures/sugar/enum-unary.lys:34:14 + 243) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:55 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^^^^^^^ + │ ^ - 246) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:13 + 244) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:34:56 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ - 247) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:34:10 + 245) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:57 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^^^ + │ ^ - 248) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:9 + 246) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:34:58 │ 34│ private fun set_value(ptr: Some, newValue: ref): void = { - │ ^ + │ ^ + + 247) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:34:59 - 249) Unexpected token "private" at test/fixtures/fixtures/sugar/enum-unary.lys:34:2 + 248) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:0 │ - 34│ private fun set_value(ptr: Some, newValue: ref): void = { + 35│ val base = ref.base(ptr) - │ ^^^^^^^ + │ ^^^^ - 250) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:34:0 + 249) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:35:4 │ - 34│ private fun set_value(ptr: Some, newValue: ref): void = { + 35│ val base = ref.base(ptr) - │ ^^ + │ ^^^ - 251) Unexpected token " + 250) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:7 + │ + 35│ val base = ref.base(ptr) -" at test/fixtures/fixtures/sugar/enum-unary.lys:32:3 + │ ^ - 252) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:32:2 + 251) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:35:8 │ - 32│ } + 35│ val base = ref.base(ptr) - │ ^ + │ ^^^^ - 253) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:32:0 + 252) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:12 │ - 32│ } - - │ ^^ + 35│ val base = ref.base(ptr) - 254) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:31:22 + │ ^ - 255) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:31:21 + 253) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:35:13 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^ + │ ^ - 256) Unexpected token "0" at test/fixtures/fixtures/sugar/enum-unary.lys:31:20 + 254) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:35:14 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^ + │ ^ - 257) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:19 + 255) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:35:15 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^ + │ ^^^ - 258) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:31:18 + 256) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:35:18 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) │ ^ - 259) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:17 + 257) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:35:19 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^ + │ ^^^^ - 260) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:31:13 + 258) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:35:23 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^^^^ + │ ^ - 261) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:31:12 + 259) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:35:24 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^ + │ ^^^ - 262) Unexpected token "read" at test/fixtures/fixtures/sugar/enum-unary.lys:31:8 + 260) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:35:27 │ - 31│ ref.read(base + 0) + 35│ val base = ref.base(ptr) - │ ^^^^ + │ ^ - 263) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:31:7 + 261) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:35:28 + + 262) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:0 │ - 31│ ref.read(base + 0) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^^^^ - 264) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:31:4 + 263) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:36:4 │ - 31│ ref.read(base + 0) + 36│ ref.store(base + 0, newValue) │ ^^^ - 265) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:31:0 + 264) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:36:7 │ - 31│ ref.read(base + 0) - - │ ^^^^ + 36│ ref.store(base + 0, newValue) - 266) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:30:28 + │ ^ - 267) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:30:27 + 265) Unexpected token "store" at test/fixtures/fixtures/sugar/enum-unary.lys:36:8 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^^^^^ - 268) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:30:24 + 266) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:36:13 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^^^ + │ ^ - 269) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:30:23 + 267) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:36:14 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^^^^ - 270) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:30:19 + 268) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:18 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^^^^ + │ ^ - 271) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:30:18 + 269) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:36:19 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^ - 272) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:30:15 + 270) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:20 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^^^ + │ ^ - 273) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:14 + 271) Unexpected token "0" at test/fixtures/fixtures/sugar/enum-unary.lys:36:21 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^ - 274) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:30:13 + 272) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:36:22 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^ - 275) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:12 + 273) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:36:23 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^ - 276) Unexpected token "base" at test/fixtures/fixtures/sugar/enum-unary.lys:30:8 + 274) Unexpected token "newValue" at test/fixtures/fixtures/sugar/enum-unary.lys:36:24 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^^^^ + │ ^^^^^^^^ - 277) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:7 + 275) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:36:32 │ - 30│ val base = ref.base(ptr) + 36│ ref.store(base + 0, newValue) - │ ^ + │ ^ + + 276) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:36:33 - 278) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:30:4 + 277) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:37:0 │ - 30│ val base = ref.base(ptr) + 37│ } - │ ^^^ + │ ^^ - 279) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:30:0 + 278) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:37:2 │ - 30│ val base = ref.base(ptr) + 37│ } - │ ^^^^ + │ ^ - 280) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:29:35 + 279) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:37:3 - 281) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:29:34 + 280) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:0 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^ - 282) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:33 + 281) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:39:2 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^^ - 283) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:29:32 + 282) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:5 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 284) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:31 + 283) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:39:6 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^ - 285) Unexpected token "f32" at test/fixtures/fixtures/sugar/enum-unary.lys:29:28 + 284) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:39:8 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^^ + │ ^ - 286) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:27 + 285) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:39:9 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^^ - 287) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:29:26 + 286) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:12 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 288) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:29:25 + 287) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:13 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 289) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:29:21 + 288) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:39:14 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^^^ + │ ^^^^ - 290) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:20 + 289) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:39:18 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 291) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:29:19 + 290) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:19 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { │ ^ - 292) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:29:16 + 291) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:39:20 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^^ + │ ^^^ - 293) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:29:15 + 292) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:23 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 294) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:29:6 + 293) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:24 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^^^^^^^^ + │ ^ - 295) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:5 + 294) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:39:25 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^^^ - 296) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:29:2 + 295) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:39:29 │ - 29│ fun get_value(ptr: Some): f32 = { + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^^ + │ ^ - 297) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:29:0 + 296) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:39:30 │ - 29│ fun get_value(ptr: Some): f32 = { - - │ ^^ - - 298) Unexpected token " + 39│ fun ==(lhs: Some, rhs: Some): boolean = { -" at test/fixtures/fixtures/sugar/enum-unary.lys:27:3 + │ ^ - 299) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:27:2 + 297) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:31 │ - 27│ } + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 300) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:27:0 + 298) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:39:32 │ - 27│ } - - │ ^^ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - 301) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:26:18 + │ ^^^^^^^ - 302) Unexpected token "Celcius" at test/fixtures/fixtures/sugar/enum-unary.lys:26:11 + 299) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:39 │ - 26│ ref as Celcius + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^^^^^^ + │ ^ - 303) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:10 + 300) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:39:40 │ - 26│ ref as Celcius + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 304) Unexpected token "as" at test/fixtures/fixtures/sugar/enum-unary.lys:26:8 + 301) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:39:41 │ - 26│ ref as Celcius + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - │ ^^ + │ ^ - 305) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:7 + 302) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:39:42 │ - 26│ ref as Celcius - - │ ^ + 39│ fun ==(lhs: Some, rhs: Some): boolean = { - 306) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:26:4 - │ - 26│ ref as Celcius + │ ^ - │ ^^^ + 303) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:39:43 - 307) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:26:0 + 304) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:0 │ - 26│ ref as Celcius + 40│ get_value(lhs) == get_value(rhs) │ ^^^^ - 308) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:25:25 - - 309) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:25:24 + 305) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:40:4 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) - │ ^ + │ ^^^^^^^^^ - 310) Unexpected token "value" at test/fixtures/fixtures/sugar/enum-unary.lys:25:19 + 306) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:40:13 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) - │ ^^^^^ + │ ^ - 311) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:25:18 + 307) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:40:14 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) - │ ^ + │ ^^^ - 312) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:25:17 + 308) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:40:17 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) │ ^ - 313) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:25:14 + 309) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:18 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) - │ ^^^ + │ ^ - 314) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:25:13 + 310) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:40:19 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) - │ ^ + │ ^^ - 315) Unexpected token "set_value" at test/fixtures/fixtures/sugar/enum-unary.lys:25:4 + 311) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:40:21 │ - 25│ set_value(ptr, value) + 40│ get_value(lhs) == get_value(rhs) - │ ^^^^^^^^^ + │ ^ - 316) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:25:0 + 312) Unexpected token "get_value" at test/fixtures/fixtures/sugar/enum-unary.lys:40:22 │ - 25│ set_value(ptr, value) - - │ ^^^^ + 40│ get_value(lhs) == get_value(rhs) - 317) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:24:82 + │ ^^^^^^^^^ - 318) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:24:78 + 313) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:40:31 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 40│ get_value(lhs) == get_value(rhs) - │ ^^^^ + │ ^ - 319) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:77 + 314) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:40:32 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 40│ get_value(lhs) == get_value(rhs) - │ ^ + │ ^^^ - 320) Unexpected token "as" at test/fixtures/fixtures/sugar/enum-unary.lys:24:75 + 315) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:40:35 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 40│ get_value(lhs) == get_value(rhs) - │ ^^ + │ ^ + + 316) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:40:36 - 321) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:74 + 317) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:41:0 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 41│ } - │ ^ + │ ^^ - 322) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:24:73 + 318) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:41:2 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 41│ } - │ ^ + │ ^ + + 319) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:41:3 - 323) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:24:72 + 320) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:0 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^ - 324) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:24:62 + 321) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:43:2 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^^^^^^^^^ + │ ^^^ - 325) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:24:61 + 322) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:5 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 326) Unexpected token "malloc" at test/fixtures/fixtures/sugar/enum-unary.lys:24:55 + 323) Unexpected token "!=" at test/fixtures/fixtures/sugar/enum-unary.lys:43:6 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^^^^^ + │ ^^ - 327) Unexpected token "::" at test/fixtures/fixtures/sugar/enum-unary.lys:24:53 + 324) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:43:8 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^ + │ ^ - 328) Unexpected token "memory" at test/fixtures/fixtures/sugar/enum-unary.lys:24:47 + 325) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:43:9 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^^^^^ + │ ^^^ - 329) Unexpected token "::" at test/fixtures/fixtures/sugar/enum-unary.lys:24:45 + 326) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:12 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^ + │ ^ - 330) Unexpected token "core" at test/fixtures/fixtures/sugar/enum-unary.lys:24:41 + 327) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:13 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^^^ + │ ^ - 331) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:40 + 328) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:43:14 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^^^ - 332) Unexpected token "|" at test/fixtures/fixtures/sugar/enum-unary.lys:24:39 + 329) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:43:18 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 333) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:38 + 330) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:19 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 334) Unexpected token "32" at test/fixtures/fixtures/sugar/enum-unary.lys:24:36 + 331) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:43:20 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^ + │ ^^^ - 335) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:35 + 332) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:23 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 336) Unexpected token "<<" at test/fixtures/fixtures/sugar/enum-unary.lys:24:33 + 333) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:24 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^ + │ ^ - 337) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:32 + 334) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:43:25 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^^^ - 338) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:24:21 + 335) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:43:29 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^^^^^^^^^^ + │ ^ - 339) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:24:20 + 336) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:43:30 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 340) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:19 + 337) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:31 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 341) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:24:18 + 338) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:43:32 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^^^^^^^ - 342) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:17 + 339) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:39 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 343) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:24:13 + 340) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:43:40 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^^^^ + │ ^ - 344) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:12 + 341) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:43:41 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 345) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:24:11 + 342) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:43:42 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 43│ fun !=(lhs: Some, rhs: Some): boolean = { - │ ^ + │ ^ - 346) Unexpected token "ptr" at test/fixtures/fixtures/sugar/enum-unary.lys:24:8 + 343) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:43:43 + + 344) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:0 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 44│ !(lhs == rhs) - │ ^^^ + │ ^^^^ - 347) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:7 + 345) Unexpected token "!" at test/fixtures/fixtures/sugar/enum-unary.lys:44:4 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 44│ !(lhs == rhs) - │ ^ + │ ^ - 348) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:24:4 + 346) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:44:5 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some + 44│ !(lhs == rhs) - │ ^^^ + │ ^ - 349) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:24:0 + 347) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:44:6 │ - 24│ val ptr: Some = (determinant << 32 | core::memory::malloc(memorySize)) as Some - - │ ^^^^ + 44│ !(lhs == rhs) - 350) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:23:33 + │ ^^^ - 351) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:23:32 + 348) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:9 │ - 23│ fun apply(value: ref): Some = { + 44│ !(lhs == rhs) - │ ^ + │ ^ - 352) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:31 + 349) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:44:10 │ - 23│ fun apply(value: ref): Some = { + 44│ !(lhs == rhs) - │ ^ + │ ^^ - 353) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:23:30 + 350) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:44:12 │ - 23│ fun apply(value: ref): Some = { + 44│ !(lhs == rhs) - │ ^ + │ ^ - 354) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:29 + 351) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:44:13 │ - 23│ fun apply(value: ref): Some = { + 44│ !(lhs == rhs) - │ ^ + │ ^^^ - 355) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:23:25 + 352) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:44:16 │ - 23│ fun apply(value: ref): Some = { + 44│ !(lhs == rhs) - │ ^^^^ + │ ^ - 356) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:24 + 353) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:44:17 + + 354) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:45:0 │ - 23│ fun apply(value: ref): Some = { + 45│ } - │ ^ + │ ^^ - 357) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:23:23 + 355) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:45:2 │ - 23│ fun apply(value: ref): Some = { + 45│ } - │ ^ + │ ^ + + 356) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:45:3 - 358) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:23:22 + 357) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:46:0 │ - 23│ fun apply(value: ref): Some = { + 46│ } - │ ^ + │ ^ - 359) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:23:19 - │ - 23│ fun apply(value: ref): Some = { + 358) Unexpected token " - │ ^^^ +" at test/fixtures/fixtures/sugar/enum-unary.lys:46:1 - 360) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:18 + 359) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:48:0 │ - 23│ fun apply(value: ref): Some = { + 48│ impl None { - │ ^ + │ ^^^^ - 361) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:23:17 + 360) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:48:4 │ - 23│ fun apply(value: ref): Some = { + 48│ impl None { - │ ^ + │ ^ - 362) Unexpected token "value" at test/fixtures/fixtures/sugar/enum-unary.lys:23:12 + 361) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:48:5 │ - 23│ fun apply(value: ref): Some = { + 48│ impl None { - │ ^^^^^ + │ ^^^^ - 363) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:23:11 + 362) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:48:9 │ - 23│ fun apply(value: ref): Some = { + 48│ impl None { - │ ^ + │ ^ - 364) Unexpected token "apply" at test/fixtures/fixtures/sugar/enum-unary.lys:23:6 + 363) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:48:10 │ - 23│ fun apply(value: ref): Some = { + 48│ impl None { - │ ^^^^^ + │ ^ - 365) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:5 + 364) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:48:11 + + 365) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:0 │ - 23│ fun apply(value: ref): Some = { + 49│ val determinant: u32 = 2 - │ ^ + │ ^^ - 366) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:23:2 + 366) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:49:2 │ - 23│ fun apply(value: ref): Some = { + 49│ val determinant: u32 = 2 │ ^^^ - 367) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:23:0 + 367) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:5 │ - 23│ fun apply(value: ref): Some = { - - │ ^^ - - 368) Unexpected token " + 49│ val determinant: u32 = 2 -" at test/fixtures/fixtures/sugar/enum-unary.lys:21:47 + │ ^ - 369) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:21:36 + 368) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:49:6 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^^^^^^^^^^^ + │ ^^^^^^^^^^^ - 370) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:35 + 369) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:49:17 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^ + │ ^ - 371) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:21:33 + 370) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:18 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^^ + │ ^ - 372) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:32 + 371) Unexpected token "u32" at test/fixtures/fixtures/sugar/enum-unary.lys:49:19 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^ + │ ^^^ - 373) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:21:21 + 372) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:22 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^^^^^^^^^^^ + │ ^ - 374) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:21:20 + 373) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:49:23 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^ + │ ^ - 375) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:21:19 + 374) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:49:24 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^ + │ ^ - 376) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:18 + 375) Unexpected token "2" at test/fixtures/fixtures/sugar/enum-unary.lys:49:25 │ - 21│ fun is(x: ref) = x.determinant == determinant + 49│ val determinant: u32 = 2 - │ ^ + │ ^ + + 376) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:49:26 - 377) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:21:17 + 377) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:0 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^^ - 378) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:16 + 378) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:50:2 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^^^ - 379) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:21:15 + 379) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:5 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^ - 380) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:21:12 + 380) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:50:6 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^^^ + │ ^^^^^^^^^^^^^^ - 381) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:11 + 381) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:50:20 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^ - 382) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:21:10 + 382) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:21 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^ - 383) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:21:9 + 383) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:50:22 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^^^ - 384) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:21:8 + 384) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:25 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^ - 385) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:21:6 + 385) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:50:26 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^^ + │ ^ - 386) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:5 + 386) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:50:27 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^ + │ ^ - 387) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:21:2 + 387) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:50:28 │ - 21│ fun is(x: ref) = x.determinant == determinant + 50│ val staticInstance: ref = determinant - │ ^^^ + │ ^^^^^^^^^^^ + + 388) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:50:39 - 388) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:21:0 + 389) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:0 │ - 21│ fun is(x: ref) = x.determinant == determinant + 51│ fun is(x: ref) = x == staticInstance │ ^^ - 389) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:20:67 - - 390) Unexpected token "/* value: ref */" at test/fixtures/fixtures/sugar/enum-unary.lys:20:51 + 390) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:51:2 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^^^^^^^^^^^^^^ + │ ^^^ - 391) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:50 + 391) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:5 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 392) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:40 + 392) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:51:6 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^^^^^^^^ + │ ^^ - 393) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:20:39 + 393) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:51:8 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 394) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:20:36 + 394) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:51:9 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^ + │ ^ - 395) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:35 + 395) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:51:10 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 396) Unexpected token "+" at test/fixtures/fixtures/sugar/enum-unary.lys:20:34 + 396) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:11 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 397) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:33 + 397) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:51:12 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^^^ - 398) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:23 + 398) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:51:15 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^^^^^^^^ + │ ^ - 399) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:20:22 + 399) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:16 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 400) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:20:19 + 400) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:51:17 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^ + │ ^ - 401) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:18 + 401) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:18 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance │ ^ - 402) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:20:17 + 402) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:51:19 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 403) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:16 + 403) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:20 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 404) Unexpected token "memorySize" at test/fixtures/fixtures/sugar/enum-unary.lys:20:6 + 404) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:51:21 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^^^^^^^^ + │ ^^ - 405) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:5 + 405) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:51:23 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^ + │ ^ - 406) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:20:2 + 406) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:51:24 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 51│ fun is(x: ref) = x == staticInstance - │ ^^^ + │ ^^^^^^^^^^^^^^ + + 407) Unexpected token " + +" at test/fixtures/fixtures/sugar/enum-unary.lys:51:38 - 407) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:20:0 + 408) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:0 │ - 20│ val memorySize = ref.memorySize + ref.memorySize /* value: ref */ + 53│ fun apply(): None = staticInstance │ ^^ - 408) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:19:26 + 409) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:53:2 + │ + 53│ fun apply(): None = staticInstance + + │ ^^^ - 409) Unexpected token "1" at test/fixtures/fixtures/sugar/enum-unary.lys:19:25 + 410) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:5 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^ - 410) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:24 + 411) Unexpected token "apply" at test/fixtures/fixtures/sugar/enum-unary.lys:53:6 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^^^^^ - 411) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:19:23 + 412) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:53:11 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^ - 412) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:22 + 413) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:53:12 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^ - 413) Unexpected token "u32" at test/fixtures/fixtures/sugar/enum-unary.lys:19:19 + 414) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:53:13 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^^^ + │ ^ - 414) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:18 + 415) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:14 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^ - 415) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:19:17 + 416) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:53:15 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^^^^ - 416) Unexpected token "determinant" at test/fixtures/fixtures/sugar/enum-unary.lys:19:6 + 417) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:19 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^^^^^^^^^^^ + │ ^ - 417) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:5 + 418) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:53:20 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^ + │ ^ - 418) Unexpected token "val" at test/fixtures/fixtures/sugar/enum-unary.lys:19:2 + 419) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:53:21 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^^^ + │ ^ - 419) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:19:0 + 420) Unexpected token "staticInstance" at test/fixtures/fixtures/sugar/enum-unary.lys:53:22 │ - 19│ val determinant: u32 = 1 + 53│ fun apply(): None = staticInstance - │ ^^ + │ ^^^^^^^^^^^^^^ - 420) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:18:11 + 421) Unexpected token " - 421) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:18:10 +" at test/fixtures/fixtures/sugar/enum-unary.lys:53:36 + + 422) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:0 │ - 18│ impl Some { + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^^ - 422) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:18:9 + 423) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:55:2 │ - 18│ impl Some { + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^^^ - 423) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:18:5 + 424) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:5 │ - 18│ impl Some { + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^^^^ + │ ^ - 424) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:18:4 + 425) Unexpected token "==" at test/fixtures/fixtures/sugar/enum-unary.lys:55:6 │ - 18│ impl Some { + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^^ - 425) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:18:0 + 426) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:55:8 │ - 18│ impl Some { + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^^^^ + │ ^ - 426) Unexpected token " + 427) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:55:9 + │ + 55│ fun ==(lhs: None, rhs: None): boolean = true -" at test/fixtures/fixtures/sugar/enum-unary.lys:16:1 + │ ^^^ - 427) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:16:0 + 428) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:12 │ - 16│ } - - │ ^ + 55│ fun ==(lhs: None, rhs: None): boolean = true - 428) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:15:3 + │ ^ - 429) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:15:2 + 429) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:13 │ - 15│ } + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 430) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:15:0 + 430) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:55:14 │ - 15│ } - - │ ^^ + 55│ fun ==(lhs: None, rhs: None): boolean = true - 431) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:14:28 + │ ^^^^ - 432) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:14:27 + 431) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:55:18 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 433) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:14:26 + 432) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:19 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 434) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:14:25 + 433) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:55:20 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^^^ - 435) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:14:23 + 434) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:23 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^^ + │ ^ - 436) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:14:22 + 435) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:24 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 437) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:14:18 + 436) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:55:25 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^^^^ + │ ^^^^ - 438) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:17 + 437) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:55:29 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 439) Unexpected token "||" at test/fixtures/fixtures/sugar/enum-unary.lys:14:15 + 438) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:55:30 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^^ + │ ^ - 440) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:14 + 439) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:31 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 441) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:14:13 + 440) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:55:32 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^^^^^^^ - 442) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:14:12 + 441) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:39 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 443) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:14:11 + 442) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:55:40 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^ - 444) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:14:9 + 443) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:55:41 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^^ + │ ^ - 445) Unexpected token "." at test/fixtures/fixtures/sugar/enum-unary.lys:14:8 + 444) Unexpected token "true" at test/fixtures/fixtures/sugar/enum-unary.lys:55:42 │ - 14│ Some.is(x) || None.is(x) + 55│ fun ==(lhs: None, rhs: None): boolean = true - │ ^ + │ ^^^^ + + 445) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:55:46 - 446) Unexpected token "Some" at test/fixtures/fixtures/sugar/enum-unary.lys:14:4 + 446) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:0 │ - 14│ Some.is(x) || None.is(x) + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^^^^ + │ ^^ - 447) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:14:0 + 447) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:56:2 │ - 14│ Some.is(x) || None.is(x) - - │ ^^^^ + 56│ fun !=(lhs: None, rhs: None): boolean = false - 448) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:13:20 + │ ^^^ - 449) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:13:19 + 448) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:5 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 450) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:18 + 449) Unexpected token "!=" at test/fixtures/fixtures/sugar/enum-unary.lys:56:6 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^^ - 451) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:13:17 + 450) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:56:8 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 452) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:16 + 451) Unexpected token "lhs" at test/fixtures/fixtures/sugar/enum-unary.lys:56:9 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^^^ - 453) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:13:15 + 452) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:12 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 454) Unexpected token "ref" at test/fixtures/fixtures/sugar/enum-unary.lys:13:12 + 453) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:13 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^^^ + │ ^ - 455) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:11 + 454) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:56:14 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^^^^ - 456) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:13:10 + 455) Unexpected token "," at test/fixtures/fixtures/sugar/enum-unary.lys:56:18 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 457) Unexpected token "x" at test/fixtures/fixtures/sugar/enum-unary.lys:13:9 + 456) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:19 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 458) Unexpected token "(" at test/fixtures/fixtures/sugar/enum-unary.lys:13:8 + 457) Unexpected token "rhs" at test/fixtures/fixtures/sugar/enum-unary.lys:56:20 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^^^ - 459) Unexpected token "is" at test/fixtures/fixtures/sugar/enum-unary.lys:13:6 + 458) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:23 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^^ + │ ^ - 460) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:5 + 459) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:24 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 461) Unexpected token "fun" at test/fixtures/fixtures/sugar/enum-unary.lys:13:2 + 460) Unexpected token "None" at test/fixtures/fixtures/sugar/enum-unary.lys:56:25 │ - 13│ fun is(x: ref) = { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^^^ + │ ^^^^ - 462) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:13:0 + 461) Unexpected token ")" at test/fixtures/fixtures/sugar/enum-unary.lys:56:29 │ - 13│ fun is(x: ref) = { - - │ ^^ + 56│ fun !=(lhs: None, rhs: None): boolean = false - 463) Unexpected token " -" at test/fixtures/fixtures/sugar/enum-unary.lys:12:16 + │ ^ - 464) Unexpected token "{" at test/fixtures/fixtures/sugar/enum-unary.lys:12:15 + 462) Unexpected token ":" at test/fixtures/fixtures/sugar/enum-unary.lys:56:30 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 465) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:12:14 + 463) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:31 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 466) Unexpected token ">" at test/fixtures/fixtures/sugar/enum-unary.lys:12:13 + 464) Unexpected token "boolean" at test/fixtures/fixtures/sugar/enum-unary.lys:56:32 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^^^^^^^ - 467) Unexpected token "T" at test/fixtures/fixtures/sugar/enum-unary.lys:12:12 + 465) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:39 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 468) Unexpected token "<" at test/fixtures/fixtures/sugar/enum-unary.lys:12:11 + 466) Unexpected token "=" at test/fixtures/fixtures/sugar/enum-unary.lys:56:40 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^ - 469) Unexpected token "Option" at test/fixtures/fixtures/sugar/enum-unary.lys:12:5 + 467) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:56:41 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^^^^^^ + │ ^ - 470) Unexpected token " " at test/fixtures/fixtures/sugar/enum-unary.lys:12:4 + 468) Unexpected token "false" at test/fixtures/fixtures/sugar/enum-unary.lys:56:42 │ - 12│ impl Option { + 56│ fun !=(lhs: None, rhs: None): boolean = false - │ ^ + │ ^^^^^ - 471) Unexpected token "impl" at test/fixtures/fixtures/sugar/enum-unary.lys:12:0 + 469) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:56:47 + + 470) Unexpected token "}" at test/fixtures/fixtures/sugar/enum-unary.lys:57:0 │ - 12│ impl Option { + 57│ } - │ ^^^^ + │ ^ + + 471) Unexpected token " +" at test/fixtures/fixtures/sugar/enum-unary.lys:57:1 diff --git a/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error b/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error index 15afd30..1e5546c 100644 --- a/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error +++ b/test/fixtures/syntaxerrors/expectedtype.lys.syntax-error @@ -1,143 +1,143 @@ - 1) Unexpected token "." at test/fixtures/syntaxerrors/expectedtype.lys:10:26 + 1) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys:3:2 │ - 10│ type b = a | type b = a & . - │ ^ + 3│ 1 - 2) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:25 - │ - 10│ type b = a | type b = a & . - │ ^ + │ ^ - 3) Unexpected token "&" at test/fixtures/syntaxerrors/expectedtype.lys:10:24 + 2) Unexpected token "1" at test/fixtures/syntaxerrors/expectedtype.lys:3:2 │ - 10│ type b = a | type b = a & . - │ ^ + 3│ 1 + + │ ^ - 4) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:23 + 3) Unexpected token " +" at test/fixtures/syntaxerrors/expectedtype.lys:3:3 + + 4) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys:6:7 │ - 10│ type b = a | type b = a & . - │ ^ + 6│ a as {} + + │ ^ - 5) Unexpected token "a" at test/fixtures/syntaxerrors/expectedtype.lys:10:22 + 5) Unexpected token "{" at test/fixtures/syntaxerrors/expectedtype.lys:6:7 │ - 10│ type b = a | type b = a & . - │ ^ + 6│ a as {} + + │ ^ - 6) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:21 + 6) Unexpected token "}" at test/fixtures/syntaxerrors/expectedtype.lys:7:0 │ - 10│ type b = a | type b = a & . - │ ^ + 7│ } + + │ ^ + + 7) Unexpected token " - 7) Unexpected token "=" at test/fixtures/syntaxerrors/expectedtype.lys:10:20 + +" at test/fixtures/syntaxerrors/expectedtype.lys:7:1 + + 8) Unexpected token "type" at test/fixtures/syntaxerrors/expectedtype.lys:10:0 │ 10│ type b = a | type b = a & . - │ ^ + │ ^^^^ - 8) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:19 + 9) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:4 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 9) Unexpected token "b" at test/fixtures/syntaxerrors/expectedtype.lys:10:18 + 10) Unexpected token "b" at test/fixtures/syntaxerrors/expectedtype.lys:10:5 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 10) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:17 + 11) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:6 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 11) Unexpected token "type" at test/fixtures/syntaxerrors/expectedtype.lys:10:13 + 12) Unexpected token "=" at test/fixtures/syntaxerrors/expectedtype.lys:10:7 │ 10│ type b = a | type b = a & . - │ ^^^^ + │ ^ - 12) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:12 + 13) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:8 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 13) Unexpected token "|" at test/fixtures/syntaxerrors/expectedtype.lys:10:11 + 14) Unexpected token "a" at test/fixtures/syntaxerrors/expectedtype.lys:10:9 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 14) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:10 + 15) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:10 │ 10│ type b = a | type b = a & . │ ^ - 15) Unexpected token "a" at test/fixtures/syntaxerrors/expectedtype.lys:10:9 + 16) Unexpected token "|" at test/fixtures/syntaxerrors/expectedtype.lys:10:11 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 16) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:8 + 17) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:12 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 17) Unexpected token "=" at test/fixtures/syntaxerrors/expectedtype.lys:10:7 + 18) Unexpected token "type" at test/fixtures/syntaxerrors/expectedtype.lys:10:13 │ 10│ type b = a | type b = a & . - │ ^ + │ ^^^^ - 18) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:6 + 19) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:17 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 19) Unexpected token "b" at test/fixtures/syntaxerrors/expectedtype.lys:10:5 + 20) Unexpected token "b" at test/fixtures/syntaxerrors/expectedtype.lys:10:18 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 20) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:4 + 21) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:19 │ 10│ type b = a | type b = a & . - │ ^ + │ ^ - 21) Unexpected token "type" at test/fixtures/syntaxerrors/expectedtype.lys:10:0 + 22) Unexpected token "=" at test/fixtures/syntaxerrors/expectedtype.lys:10:20 │ 10│ type b = a | type b = a & . - │ ^^^^ - - 22) Unexpected token " - - -" at test/fixtures/syntaxerrors/expectedtype.lys:7:1 + │ ^ - 23) Unexpected token "}" at test/fixtures/syntaxerrors/expectedtype.lys:7:0 + 23) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:21 │ - 7│ } - - │ ^ + 10│ type b = a | type b = a & . + │ ^ - 24) Unexpected token "{" at test/fixtures/syntaxerrors/expectedtype.lys:6:7 + 24) Unexpected token "a" at test/fixtures/syntaxerrors/expectedtype.lys:10:22 │ - 6│ a as {} - - │ ^ + 10│ type b = a | type b = a & . + │ ^ - 25) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys:6:7 + 25) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:23 │ - 6│ a as {} - - │ ^ - - 26) Unexpected token " -" at test/fixtures/syntaxerrors/expectedtype.lys:3:3 + 10│ type b = a | type b = a & . + │ ^ - 27) Unexpected token "1" at test/fixtures/syntaxerrors/expectedtype.lys:3:2 + 26) Unexpected token "&" at test/fixtures/syntaxerrors/expectedtype.lys:10:24 │ - 3│ 1 - - │ ^ + 10│ type b = a | type b = a & . + │ ^ - 28) A type was expected at test/fixtures/syntaxerrors/expectedtype.lys:3:2 + 27) Unexpected token " " at test/fixtures/syntaxerrors/expectedtype.lys:10:25 │ - 3│ 1 + 10│ type b = a | type b = a & . + │ ^ - │ ^ + 28) Unexpected token "." at test/fixtures/syntaxerrors/expectedtype.lys:10:26 + │ + 10│ type b = a | type b = a & . + │ ^ diff --git a/test/fixtures/syntaxerrors/var.lys.syntax-error b/test/fixtures/syntaxerrors/var.lys.syntax-error index 2a95e32..d05b692 100644 --- a/test/fixtures/syntaxerrors/var.lys.syntax-error +++ b/test/fixtures/syntaxerrors/var.lys.syntax-error @@ -1,53 +1,53 @@ - 1) Unexpected token "1" at test/fixtures/syntaxerrors/var.lys:6:6 + 1) A value was expected. at test/fixtures/syntaxerrors/var.lys:2:0 │ - 6│ var = 1 - │ ^ - - 2) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:6:5 - │ - 6│ var = 1 - │ ^ + 2│ var y = 1 - 3) Unexpected token "=" at test/fixtures/syntaxerrors/var.lys:6:4 - │ - 6│ var = 1 - │ ^ + │ ^^^ - 4) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:6:3 + 2) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:4:0 │ - 6│ var = 1 - │ ^ + 4│ var var - 5) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:6:0 - │ - 6│ var = 1 │ ^^^ - 6) Unexpected token " + 3) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:4:3 + │ + 4│ var var -" at test/fixtures/syntaxerrors/var.lys:4:7 + │ ^ - 7) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:4:4 + 4) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:4:4 │ 4│ var var │ ^^^ - 8) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:4:3 + 5) Unexpected token " + +" at test/fixtures/syntaxerrors/var.lys:4:7 + + 6) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:6:0 │ - 4│ var var + 6│ var = 1 + │ ^^^ + 7) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:6:3 + │ + 6│ var = 1 │ ^ - 9) Unexpected token "var" at test/fixtures/syntaxerrors/var.lys:4:0 + 8) Unexpected token "=" at test/fixtures/syntaxerrors/var.lys:6:4 │ - 4│ var var - - │ ^^^ + 6│ var = 1 + │ ^ - 10) A value was expected. at test/fixtures/syntaxerrors/var.lys:2:0 + 9) Unexpected token " " at test/fixtures/syntaxerrors/var.lys:6:5 │ - 2│ var y = 1 + 6│ var = 1 + │ ^ - │ ^^^ + 10) Unexpected token "1" at test/fixtures/syntaxerrors/var.lys:6:6 + │ + 6│ var = 1 + │ ^ diff --git a/test/fixtures/syntaxerrors/wasm.lys.syntax-error b/test/fixtures/syntaxerrors/wasm.lys.syntax-error index c9865de..7143b22 100644 --- a/test/fixtures/syntaxerrors/wasm.lys.syntax-error +++ b/test/fixtures/syntaxerrors/wasm.lys.syntax-error @@ -1,17 +1,17 @@ - 1) Unexpected token ")" at test/fixtures/syntaxerrors/wasm.lys:7:23 + 1) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys:3:21 + + 2) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys:7:21 │ 7│ fun x(): void = %wasm () - │ ^ + │ ^ - 2) Unexpected token "(" at test/fixtures/syntaxerrors/wasm.lys:7:22 + 3) Unexpected token "(" at test/fixtures/syntaxerrors/wasm.lys:7:22 │ 7│ fun x(): void = %wasm () │ ^ - 3) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys:7:21 + 4) Unexpected token ")" at test/fixtures/syntaxerrors/wasm.lys:7:23 │ 7│ fun x(): void = %wasm () - │ ^ - - 4) A block of symbolic expressions was expected at test/fixtures/syntaxerrors/wasm.lys:3:21 + │ ^