From 62169b44cc79734e11bf44b8d7154865dee5936b Mon Sep 17 00:00:00 2001 From: Tim Condon <0xTim@users.noreply.github.com> Date: Tue, 7 Mar 2023 13:37:31 +0000 Subject: [PATCH] Fix error message in loop syntax (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix error message in loop syntax * Fix error message thrown in loops --------- Co-authored-by: Zsolt VĂ¡radi <1783465+vzsg@users.noreply.github.com> --- Sources/LeafKit/LeafSyntax/LeafSyntax.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/LeafKit/LeafSyntax/LeafSyntax.swift b/Sources/LeafKit/LeafSyntax/LeafSyntax.swift index a9ce01f..29b0488 100644 --- a/Sources/LeafKit/LeafSyntax/LeafSyntax.swift +++ b/Sources/LeafKit/LeafSyntax/LeafSyntax.swift @@ -555,7 +555,7 @@ extension Syntax { k == .in, case .parameter(let right) = list[2], case .variable(let array) = right - else { throw "for loops expect one of the following expressions: 'name in names' or 'name, nameIndex in names'" } + else { throw "for loops expect one of the following expressions: 'name in names' or 'nameIndex, name in names'" } self.item = item self.array = array self.index = "index" @@ -572,7 +572,7 @@ extension Syntax { k == .in, case .parameter(let right) = list[2], case .variable(let array) = right - else { throw "for loops expect one of the following expressions: 'name in names' or 'name, nameIndex in names'" } + else { throw "for loops expect one of the following expressions: 'name in names' or 'nameIndex, name in names'" } self.item = item self.array = array self.index = index