예제 #1
0
		public virtual void PostWalk(BinaryExpr node) { }
예제 #2
0
		public override void PostWalk(BinaryExpr node) { }
예제 #3
0
		// BinaryExpr
		public virtual bool Walk(BinaryExpr node) { return true; }
예제 #4
0
		// BinaryExpr
		public override bool Walk(BinaryExpr node) { return false; }
예제 #5
0
        private Expr ParseMultiplicativeExpr()
        {
            Expr ret = ParsePrefixedExpr();
            if (ret == null)
                return ret;

            TotemOperator op;
            while (IsMultiplicativeToken(PeekToken(), out op))
            {
                Token t = NextToken();
                var start = ret.StartIndex;
                ret = new BinaryExpr(op, ret, ParsePrefixedExpr());
                ret.SetLoc(_globalParent, start, GetEnd());
            }
            return ret;
        }
예제 #6
0
        private Expr ParseRelationalExpr()
        {
            Expr ret = ParseAdditiveExpr();
            if (ret == null)
                return ret;

            TotemOperator op;
            if (IsRelationalToken(PeekToken(), out op))
            {
                Token t = NextToken();
                var start = ret.StartIndex;
                ret = new BinaryExpr(op, ret, ParseRelationalExpr());
                ret.SetLoc(_globalParent, start, GetEnd());
            }
            return ret;
        }
예제 #7
0
        private Expr ParseLogicalAndExpr()
        {
            Expr ret = ParseEqualityExpr();
            if (ret == null)
                return ret;

            while (MaybeEat(TokenType.LogicalAnd))
            {
                var start = ret.StartIndex;
                ret = new BinaryExpr(TotemOperator.LogicalAnd, ret, ParseEqualityExpr());
                ret.SetLoc(_globalParent, start, GetEnd());
            }
            return ret;
        }
		// BinaryExpr
		public override bool Walk(BinaryExpr node)
		{
			node.Parent = _currentScope;
			
			return base.Walk(node);
		}