コード例 #1
0
ファイル: Expander.cs プロジェクト: GlenDC/L20n.cs
				public static bool PeekAndParse(
					CharStream stream, out AST.INode expression)
				{
					if (stream.PeekNextRange(2) == "{{")
					{
						expression = Expander.Parse(stream);
						return true;
					}

					expression = null;
					return false;
				}
コード例 #2
0
ファイル: Quote.cs プロジェクト: GlenDC/L20n.cs
				public static bool Peek(CharStream stream, Quote.Info quote = null)
				{
					if (quote != null)
					{
						var raw = quote.ToString();
						var output = stream.PeekNextRange(raw.Length);

						return raw == output;
					}

					char next = stream.PeekNext();
					return next == '\'' || next == '\"';
				}