public static LexStateFunc LexQuotes(LexerBase lexer) { while (true) { var c = lexer.Next(); switch (c) { case '\\': if (lexer.Peek() == '"') { lexer.Next(); } break; case '"': lexer.Emit(TokenType.Parameter); return(LexParameters); case LexerBase.EOF: throw new TemplateException(string.Format("Unfinished parameter at line {0}", lexer.Line)); } } }
public static LexStateFunc LexQuotes(LexerBase lexer) { while(true) { var c = lexer.Next(); switch(c) { case '\\': if(lexer.Peek() == '"') { lexer.Next(); } break; case '"': lexer.Emit(TokenType.Parameter); return LexParameters; case LexerBase.EOF: throw new TemplateException(string.Format("Unfinished parameter at line {0}", lexer.Line)); } } }