src/main.rs

changeset 9
87d632a18fc2
parent 8
945a396340d2
equal deleted inserted replaced
8:945a396340d2 9:87d632a18fc2
146 } 146 }
147 147
148 impl<W : Write + 'static> ChainRule<W> for CommandName<W> { 148 impl<W : Write + 'static> ChainRule<W> for CommandName<W> {
149 fn consume(mut self : Box<Self>, c : char, ctx : &Context) -> AnyChainRule<W> { 149 fn consume(mut self : Box<Self>, c : char, ctx : &Context) -> AnyChainRule<W> {
150 match c { 150 match c {
151 '}' | '{' | '\\' if self.command.len() <= 1 => { 151 '}' | '{' | '\\' | '%' if self.command.len() <= 1 => {
152 self.command.push(c); 152 self.command.push(c);
153 self.handle(ctx) 153 self.handle(ctx)
154 }, 154 },
155 c if c.is_alphanumeric() => { 155 c if c.is_alphanumeric() => {
156 self.command.push(c); 156 self.command.push(c);

mercurial