~cadence/PE-DIA

4c5b53bd8bee89551f16e0875609a5009402dc19 — Cadence Ember 1 year, 3 months ago 08b5947
Allow built-in effect names as aliases
1 files changed, 6 insertions(+), 2 deletions(-)

M processor.js
M processor.js => processor.js +6 -2
@@ 173,9 173,13 @@ class Interchange {
			parser.pushSubstore(inside)
			// the next word is the command word for this bracket sequence. it's the name of the effect
			const myEffectName = parser.get({split: " "})
			const formalEffectName = formalEffects.get(myEffectName)
			let formalEffectName = formalEffects.get(myEffectName)
			if (!formalEffectName) {
				throw new Error(`No text effect named '${myEffectName}'`)
				if (myEffectName.match(/^[EC][A-Z]{3}$/)) {
					formalEffectName = myEffectName
				} else {
					throw new Error(`No text effect named '${myEffectName}'`)
				}
			}
			openEffects.push({effect: formalEffectName, start: noEffectText.length})
			// console.error(`effect ${effect} started. open effects:`, openEffects)