minor fixes
This commit is contained in:
		| @@ -22,9 +22,21 @@ | |||||||
|   while i < elmts.len() { |   while i < elmts.len() { | ||||||
|     let elmt = elmts.at(i) |     let elmt = elmts.at(i) | ||||||
|     if elmt.type == "grp" { |     if elmt.type == "grp" { | ||||||
|  |       let grp-elmts = elmt.elmts | ||||||
|  |       elmt.elmts = elmt.elmts.map(e => { | ||||||
|  |         if e.type == "seq" { | ||||||
|  |           if e.p1 == "?" { | ||||||
|  |             e.p1 = "?" + e.p2 | ||||||
|  |           } else if e.p2 == "?" { | ||||||
|  |             e.p2 = e.p1 + "?" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |         e | ||||||
|  |       }) | ||||||
|  |       elmts.at(i) = elmt | ||||||
|       elmts = ( |       elmts = ( | ||||||
|         elmts.slice(0, i + 1) + |         elmts.slice(0, i + 1) + | ||||||
|         elmt.elmts + |         grp-elmts + | ||||||
|         (( |         (( | ||||||
|           type: "grp-end" |           type: "grp-end" | ||||||
|         ),) + |         ),) + | ||||||
| @@ -46,6 +58,10 @@ | |||||||
|       if not participant._exists(participants, elmt.p2) { |       if not participant._exists(participants, elmt.p2) { | ||||||
|         let par = _par(elmt.p2, from-start: not elmt.create-dst).first() |         let par = _par(elmt.p2, from-start: not elmt.create-dst).first() | ||||||
|         participants.push(par) |         participants.push(par) | ||||||
|  |        | ||||||
|  |       } else if elmt.create-dst { | ||||||
|  |         let i = participants.position(p => p.name == elmt.p2) | ||||||
|  |         participants.at(i).from-start = false | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       if elmt.p1 == "?" { |       if elmt.p1 == "?" { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user