protected virtual void VisitReturnStatement(ReturnStatementNode node)
 {
     if (node.ExpressionNode != null)
     {
         Visit(node.ExpressionNode);
     }
 }
예제 #2
0
 protected virtual T VisitReturnStatement(ReturnStatementNode node)
 {
     if (node.ExpressionNode != null)
     {
         Visit(node.ExpressionNode);
     }
     return(DefaultResult);
 }
예제 #3
0
        protected override void VisitReturnStatement(ReturnStatementNode node)
        {
            ASTNode parentBlockNode = node.GetFirstSignificantAncestorNode();
            FunctionDefinitionNode functionDefinitionNode = (FunctionDefinitionNode)parentBlockNode;
            SymbolTypePair         functionType           = GetSymbolTypePairFromSymbol(functionDefinitionNode.Symbol);


            /*
             * if (functionDefinitionNode.Symbol.BuiltinType == SymbolType.Float)
             * {
             *  _isInsideFloatExpression = true;
             * }
             */

            _currentExpressionTypes.Push(functionType);
            base.VisitReturnStatement(node);
            _currentExpressionTypes.Pop();

            //_isInsideFloatExpression = false;
        }