System.Linq.Dynamic.Parser.ParseLogicalOr C# (CSharp) Méthode

ParseLogicalOr() private méthode

private ParseLogicalOr ( ParseNode parent ) : void
parent ParseNode
Résultat void
		private void ParseLogicalOr(ParseNode parent) // NonTerminalSymbol: LogicalOr
		{
			ParseNode node = parent.CreateNode(_scanner.GetToken(TokenType.LogicalOr), "LogicalOr");
			parent.Nodes.Add(node);


			// Concat Rule
			ParseLogicalAnd(node); // NonTerminal Rule: LogicalAnd

			// Concat Rule
			var tok = _scanner.LookAhead(TokenType.OR);
			while (tok.Type == TokenType.OR)
			{

				// Concat Rule
				tok = _scanner.Scan(TokenType.OR); // Terminal Rule: OR
				var n = node.CreateNode(tok, tok.ToString());
				node.Token.UpdateRange(tok);
				node.Nodes.Add(n);
				if (tok.Type != TokenType.OR)
				{
					tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.OR.ToString(),
						0x1001, tok));
					return;
				}

				// Concat Rule
				ParseLogicalAnd(node); // NonTerminal Rule: LogicalAnd
				tok = _scanner.LookAhead(TokenType.OR); // ZeroOrMore Rule
			}

			parent.Token.UpdateRange(node.Token);
		} // NonTerminalSymbol: LogicalOr