Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add statically initialized pattern tree
Example of what's generated: static readonly Pattern Pattern = new Required(ImmutableArray.Create<Pattern>( new Either(ImmutableArray.Create<Pattern>( new Required(ImmutableArray.Create<Pattern>( new Command("ship"), new Command("new"), new OneOrMore( new Argument("<name>", null)))), new Required(ImmutableArray.Create<Pattern>( new Command("ship"), new Argument("<name>", null), new Command("move"), new Argument("<x>", null), new Argument("<y>", null), new Optional(ImmutableArray.Create<Pattern>( new Option("", "--speed", 1, null))))), new Required(ImmutableArray.Create<Pattern>( new Command("ship"), new Command("shoot"), new Argument("<x>", null), new Argument("<y>", null))), new Required(ImmutableArray.Create<Pattern>( new Command("mine"), new Required(ImmutableArray.Create<Pattern>( new Either(ImmutableArray.Create<Pattern>( new Command("set"), new Command("remove"))))), new Argument("<x>", null), new Argument("<y>", null), new Optional(ImmutableArray.Create<Pattern>( new Either(ImmutableArray.Create<Pattern>( new Option("", "--moored", 0, null), new Option("", "--drifting", 0, null))))))), new Required(ImmutableArray.Create<Pattern>( new Required(ImmutableArray.Create<Pattern>( new Option("-h", "--help", 0, null))))), new Required(ImmutableArray.Create<Pattern>( new Option("", "--version", 0, null)))))));
- Loading branch information