/* 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/.
 * 
 * contextrule.h
 *
 *  Created on: Jan 2, 2016
 *      Author: pgess <v.melnychenko@xreate.org>
 */


#ifndef SRC_CONTEXTRULE_H_
#define SRC_CONTEXTRULE_H_

#include "ast.h"
#include <string>

namespace xreate {

typedef unsigned int ScopePacked;

class ContextRule {
	public:
		ContextRule(const Expression& rule);
		std::string compile(const ScopePacked& scopeId) const;

	private:
		Expression head;
		Expression guards;
		Expression body;
};
}

#endif /* SRC_CONTEXTRULE_H_ */
