Ejemplo n.º 1
0
        public void VisitFunction(Function function, AST.Function _function)
        {
            VisitDeclaration(function, _function);

            _function.ReturnType        = typeConverter.VisitQualified(function.ReturnType);
            _function.IsReturnIndirect  = function.IsReturnIndirect;
            _function.IsVariadic        = function.IsVariadic;
            _function.IsInline          = function.IsInline;
            _function.IsPure            = function.IsPure;
            _function.IsDeleted         = function.IsDeleted;
            _function.OperatorKind      = VisitCXXOperatorKind(function.OperatorKind);
            _function.Mangled           = function.Mangled;
            _function.Signature         = function.Signature;
            _function.CallingConvention = VisitCallingConvention(function.CallingConvention);

            for (uint i = 0; i < function.ParametersCount; ++i)
            {
                var param  = function.getParameters(i);
                var _param = Visit(param) as AST.Parameter;
                _function.Parameters.Add(_param);
            }
        }
Ejemplo n.º 2
0
 public virtual string VisitFunctionDecl(Function function)
 {
     return(VisitDeclaration(function));
 }