#ifndef TOOLS_GN_TEMPLATE_H_
#define TOOLS_GN_TEMPLATE_H_
#include <vector>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
class BlockNode;
class Err;
class FunctionCallNode;
class LocationRange;
class Scope;
class Value;
class Template {
public:
Template(const Scope* scope, const FunctionCallNode* def);
Template(scoped_ptr<Scope> closure, const FunctionCallNode* def);
~Template();
scoped_ptr<Template> Clone() const;
Value Invoke(Scope* scope,
const FunctionCallNode* invocation,
const std::vector<Value>& args,
BlockNode* block,
Err* err) const;
LocationRange GetDefinitionRange() const;
private:
Template();
scoped_ptr<Scope> closure_;
const FunctionCallNode* definition_;
DISALLOW_COPY_AND_ASSIGN(Template);
};
#endif