/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * 
 * Author: pgess <v.melnychenko@xreate.org>
 * Created on June 15, 2018, 5:28 PM
 */
 
/** 
 * \file    interpretation-instructions.h
 * \brief   The interpretation related statements
 */

#ifndef INTERPRETATION_INSTRUCTIONS_H
#define INTERPRETATION_INSTRUCTIONS_H

#include "ast.h"

namespace xreate{
namespace compilation{
    class Context;
}
}

namespace xreate{
namespace interpretation{

class  InterpretationFunction;

/** \brief `intrinsic query` statement */
class IntrinsicQueryInstruction{
public:
    IntrinsicQueryInstruction(InterpretationFunction* fn): __fnI12n(fn){ }
    
    /** \brief Processes `intrinsic query` instruction */
    Expression process(const Expression& expression);
    
    /** \brief Processes `intrinsic query late` instruction */
    llvm::Value* processLate(const Expression& expression, const compilation::Context& context);

private:
    InterpretationFunction* __fnI12n;
};

}
} //end of xreate::interpretation

#endif /* INTERPRETATION_INSTRUCTIONS_H */

