Ejemplo n.º 1
0
        public override Expression VisitInclusive_or_expression(Inclusive_or_expressionContext context)
        {
            var expression = Visit(context.children[0]);

            for (int i = 1; i < context.children.Count - 1; i += 2)
            {
                var current = Visit(context.children[i + 1]);
                expression = Expression.Or(expression, current);
            }
            return(expression);
        }
Ejemplo n.º 2
0
	public Inclusive_or_expressionContext inclusive_or_expression() {
		Inclusive_or_expressionContext _localctx = new Inclusive_or_expressionContext(_ctx, State);
		EnterRule(_localctx, 218, RULE_inclusive_or_expression);
		int _la;
		try {
			EnterOuterAlt(_localctx, 1);
			{
			State = 1211; exclusive_or_expression();
			State = 1216;
			_errHandler.Sync(this);
			_la = _input.La(1);
			while (_la==BITOR) {
				{
				{
				State = 1212; Match(BITOR);
				State = 1213; exclusive_or_expression();
				}
				}
				State = 1218;
				_errHandler.Sync(this);
				_la = _input.La(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.ReportError(this, re);
			_errHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}