typehints.h
No OneTemporary

File Metadata

Created
Fri, Nov 20, 11:22 PM

typehints.h

/* 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/.
*
* typehints.h
*
* Author: pgess <v.melnychenko@xreate.org>
*/
/**
* \file typehints.h
* \brief Type inference hints
*/
#ifndef XREATE_TYPEHINTS_H
#define XREATE_TYPEHINTS_H
#include "ast.h"
namespace xreate{namespace typehints{
struct IntBits{
unsigned int size;
};
struct Array{
size_t size;
};
template<class Typ>
Typ getHint(const Expression& e, const Typ& def);
template<>
IntBits getHint(const Expression& e, const IntBits& def);
template<>
Array getHint(const Expression& e, const Array& def);
template<class Typ>
Typ parse(const Expression& e);
template<> IntBits parse(const Expression& e);
template<> Array parse(const Expression& e);
}}
#endif //XREATE_TYPEHINTS_H

Event Timeline