Exemple #1
0
        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));
                }
            }
        }
Exemple #2
0
		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));
				}
			}
		}