Skip to content

Commit

Permalink
Fix usage of refactored constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
koliyo committed Oct 2, 2023
1 parent 58b8279 commit c0e4829
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/FrontEnd/Parse/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ public enum Parser {
try parseConditionalExpr(in: &s).map(AnyExprID.init(_:)) ?? parseBracedExpr(in: &s)
})

let elseClause = Introduced(introducerSite: elseIntroducer.site, value: b)
let elseClause = Introduced(b, at: elseIntroducer.site)

return state.insert(
ConditionalExpr(
Expand Down Expand Up @@ -2740,11 +2740,11 @@ public enum Parser {

if let s = try parseConditionalStmt(in: &state) {
let s = AnyStmtID(s)
return Introduced(introducerSite: introducer.site, value: s)
return Introduced(s, at: introducer.site)
}
else {
let s = AnyStmtID(try state.expect("'{'", using: braceStmt))
return Introduced(introducerSite: introducer.site, value: s)
return Introduced(s, at: introducer.site)
}
}

Expand All @@ -2771,7 +2771,7 @@ public enum Parser {
state.insert(
DoWhileStmt(
introducerSite: tree.0.0.0.site,
body: tree.0.0.1, condition: Introduced(introducerSite: tree.0.1.site, value: tree.1),
body: tree.0.0.1, condition: Introduced(tree.1, at: tree.0.1.site),
site: tree.0.0.0.site.extended(upTo: state.currentIndex)))
}))

Expand Down Expand Up @@ -2802,9 +2802,9 @@ public enum Parser {
site: tree.0.0.0.0.site.extended(upTo: state.currentIndex)))
}))

static let forSite = (take(.in).and(expr).map({ (state, tree) in Introduced(introducerSite: tree.0.site, value: tree.1)}))
static let forSite = (take(.in).and(expr).map({ (state, tree) in Introduced(tree.1, at: tree.0.site)}))

static let forFilter = (take(.where).and(expr).map({ (state, tree) in Introduced(introducerSite: tree.0.site, value: tree.1)}))
static let forFilter = (take(.where).and(expr).map({ (state, tree) in Introduced(tree.1, at: tree.0.site)}))

static let loopBody = inContext(.loopBody, apply: braceStmt)

Expand Down

0 comments on commit c0e4829

Please sign in to comment.