Beispiel #1
0
        public object VisitElseifNode(ElseifNode node, Context parameter)
        {
            foreach (var child in node.Children)
            {
                child.Accept(this, parameter);
            }

            return(null);
        }
Beispiel #2
0
        private void ParseElseIfBlockComment()
        {
            if (!IsInIfBlockNode())
            {
                throw new SqlParseException(ExceptionMessageId.Esp2138, _sql, _tokenizer.LineNumber,
                                            _tokenizer.Position);
            }
            RemoveNodesTo <IfBlockNode>();
            var ifBlockNode = (IfBlockNode)Peek();

            if (ifBlockNode.IsElseNodeExists)
            {
                throw new SqlParseException(ExceptionMessageId.Esp2139, _sql, _tokenizer.LineNumber,
                                            _tokenizer.Position);
            }

            var expression = SqlTokenHelper.Extract(_tokenType, _token);
            var node       = new ElseifNode(Location, expression, _token);

            ifBlockNode.AddElseifNode(node);
            _nodeStack.Push(node);
        }