Goose  inv-func.cpp at [75e7722591]

File bs/sema/inv-func.cpp artifact 7d2f751447 part of check-in 75e7722591


#include "sema.h"

namespace empathy::sema
{
    class FunctionInvocationRule : public InvocationRule
    {
        public:
            virtual optional< Value > resolveInvocation( const ptr< Env >& env, const Value& callee, const Value& args ) const override
            {
                // Just a placeholder for now
                cout << "func invocation\n";
                return nullopt;
            }

            virtual Term getSignature( const ptr< Env >& env, const Value& callee ) const override
            {
                // Just a placeholder for now
                return TSID( func_sig_placeholder );
            }
    };

    void SetupFunctionInvocationRule( InvocationRuleSet& ruleSet )
    {
        ruleSet.addRule(
            ValueToIRExpr( Value( TSID( type ), TVEC( TSID( func ),
                ANYTERM( k ), ANYTERM( rt ), ANYTERM( p ), ANYTERM( sig ) ) ) ),
                make_shared< FunctionInvocationRule >() );
    }
}