def-gthill / lexurgy

A high-powered sound change applier
GNU General Public License v3.0
42 stars 5 forks source link

Feature Suggestion: Reusing rules #51

Closed seaming closed 1 year ago

seaming commented 1 year ago

Hi!

Since Lexurgy rules are already all uniquely named and I often find myself in a situation where I want to re-apply a rule I used earlier, it seems natural to allow something like the following:

rule:
  a => b / _ b

rule # apply the rule `rule` again

To save copying and then also having to rename the rule that I'd already defined earlier.

I can foresee potential issues with the parsing here what with the flexibility around whitespace, so alternatively the re-run line could be introduced by a keyword, e.g. run rule, apply rule, etc.

Apologies if there's already a way of doing this that I've missed. Thanks!

def-gthill commented 1 year ago

I'm working on a similar feature for the version 1.1 release. Stay tuned!

def-gthill commented 1 year ago

Lexurgy 1.1 is now live, featuring "deferred rules" that can be used for situations like this.

Thanks for the suggestion!