Пример #1
0
        public override void Visit(OperatorAST op)
        {
            op.Lhs.Accept(this);

            var lhsType = _stateInfo.currentType;

            op.Rhs.Accept(this);

            var rhsType = _stateInfo.currentType;

            if (IsLogicalOperator(op.OperatorString))
            {
                _stateInfo.currentType = new TypeAST {
                    TypeName = Enum.GetName(typeof(Keyword), Keyword.BOOL).ToLower()
                };
                return;
            }

            _stateInfo.currentType = new TypeAST {
                TypeName = GetTypeOf(lhsType, rhsType)
            };
        }
Пример #2
0
 public override void Visit(OperatorAST op)
 {
 }
Пример #3
0
 public virtual void Visit(OperatorAST op)
 {
 }