37 lines
750 B
C++
37 lines
750 B
C++
#ifndef DEF_UTILS_H
|
|
#define DEF_UTILS_H
|
|
|
|
#include "types.h"
|
|
using namespace std;
|
|
|
|
/**
|
|
* Returns the CodePosition of a node
|
|
*/
|
|
CodePosition get_node_pos(Node node);
|
|
|
|
/**
|
|
* Returns a Type object of the given TypeType
|
|
*/
|
|
Type type_type_to_type(TypeType type_type);
|
|
|
|
/**
|
|
* Returns the Type associated with a type name
|
|
*/
|
|
Type string_to_type(string type_name);
|
|
|
|
/**
|
|
* Turns a FunctionPrototype or FunctionDeclaration node into a FunctionPrototype object
|
|
*/
|
|
FunctionPrototype make_fn_prototype(InnerNode node);
|
|
|
|
/**
|
|
* Splits a string using the provided delimiter
|
|
*/
|
|
vector<string> split_string(const string& input, char delimiter);
|
|
|
|
/**
|
|
* Returns a human-readable name for a TypeType object
|
|
*/
|
|
string _debug_get_type_type_name(TypeType type);
|
|
|
|
#endif |