Skip to content

Commit

Permalink
Fix SET-PATH! in PARSE
Browse files Browse the repository at this point in the history
  • Loading branch information
hostilefork committed Jan 29, 2017
1 parent 6866c00 commit 89f2202
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/u-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,11 +1684,12 @@ REBNATIVE(subparse)
)) {
fail (Error_No_Catch_For_Throw(&save));
}
rule = &save;

// !!! code used to say `if (!rule) continue;` "for SET and
// GET cases", but here rule isn't set to NULL...so it falls
// through and does not continue. Investigate.
// Nothing left to do after storing the parse position in the
// path location...continue.
//
FETCH_NEXT_RULE_MAYBE_END(f);
continue;
}
else if (IS_GET_PATH(P_RULE)) {

Expand Down
6 changes: 6 additions & 0 deletions tests/parse-tests.r
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,9 @@
; self-modifying rule, not legal in Ren-C if it's during the parse
[error? try [not parse? "abcd" rule: ["ab" (remove back tail rule) "cd"]]]
[
https://github.com/metaeducation/ren-c/issues/377
o: make object! [a: 1]
true = parse "a" [o/a: skip]
]

0 comments on commit 89f2202

Please sign in to comment.