chore: remove old lang syste,
This commit is contained in:
parent
aaa0656cde
commit
4d622c9570
@ -1,38 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "lang/common.hh"
|
|
||||||
#include "lang/types.hh"
|
|
||||||
#include "lang/version.hh"
|
|
||||||
|
|
||||||
namespace ppc::lang {
|
|
||||||
// A structure, containing all the definitions of a namespace
|
|
||||||
struct namespace_t {
|
|
||||||
// The name of the namespace
|
|
||||||
namespace_name_t name;
|
|
||||||
// The version of the namespace
|
|
||||||
version_t version;
|
|
||||||
// A list of all the defined types inside the namespace
|
|
||||||
std::vector<ppc::lang::type_def_t> types;
|
|
||||||
// A list of all the defined fields inside the namespace
|
|
||||||
std::vector<field_t> fields;
|
|
||||||
|
|
||||||
bool contains_def(const std::string &name, location_t &ploc) const;
|
|
||||||
inline bool contains_def(const std::string &name) const {
|
|
||||||
location_t ploc;
|
|
||||||
return contains_def(name, ploc);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
static bool contains_def(T namespaces, const namespace_name_t &def_nmsp, const std::string &name, location_t &ploc) {
|
|
||||||
for (const namespace_t &nmsp : namespaces) {
|
|
||||||
if (nmsp.name == def_nmsp && nmsp.contains_def(name)) return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
template <class T>
|
|
||||||
static inline bool contains_def(T namespaces, const namespace_name_t &def_nmsp, const std::string &name) {
|
|
||||||
location_t ploc;
|
|
||||||
return contains_def(namespaces, def_nmsp, name, ploc);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
enum operator_t {
|
|
||||||
OPERATOR_NONE,
|
|
||||||
OPERATOR_LESS_THAN,
|
|
||||||
OPERATOR_GREATER_THAN,
|
|
||||||
OPERATOR_LESS_THAN_EQUALS,
|
|
||||||
OPERATOR_GREATER_THAN_EQUALS,
|
|
||||||
OPERATOR_EQUALS,
|
|
||||||
OPERATOR_NOT_EQUALS,
|
|
||||||
OPERATOR_BOOLEAN_AND,
|
|
||||||
OPERATOR_BOOLEAN_OR,
|
|
||||||
|
|
||||||
OPERATOR_SHIFT_LEFT,
|
|
||||||
OPERATOR_SHIFT_RIGHT,
|
|
||||||
OPERATOR_BINARY_XOR,
|
|
||||||
OPERATOR_BINARY_AND,
|
|
||||||
OPERATOR_BINARY_OR,
|
|
||||||
OPERATOR_BOOLEAN_NOT,
|
|
||||||
OPERATOR_BITWISE_NEGATIVE,
|
|
||||||
|
|
||||||
OPERATOR_INCREASE,
|
|
||||||
OPERATOR_DECREASE,
|
|
||||||
|
|
||||||
OPERATOR_POST_INCREASE,
|
|
||||||
OPERATOR_POST_DECREASE,
|
|
||||||
|
|
||||||
OPERATOR_ADD,
|
|
||||||
OPERATOR_SUBTRACT,
|
|
||||||
OPERATOR_DIVIDE,
|
|
||||||
OPERATOR_MULTIPLY,
|
|
||||||
OPERATOR_MODULO,
|
|
||||||
|
|
||||||
OPERATOR_POSITIVE,
|
|
||||||
OPERATOR_NEGATIVE,
|
|
||||||
|
|
||||||
OPERATOR_CONDITIONAL,
|
|
||||||
OPERATOR_NULL_COALESCING,
|
|
||||||
|
|
||||||
OPERATOR_IMPLICIT,
|
|
||||||
OPERATOR_EXPLICIT,
|
|
||||||
|
|
||||||
OPERATOR_NEW,
|
|
||||||
OPERATOR_VAL,
|
|
||||||
|
|
||||||
OPERATOR_ASSIGN,
|
|
||||||
|
|
||||||
OPERATOR_PTR_MEMBER,
|
|
||||||
OPERATOR_MEMBER,
|
|
||||||
|
|
||||||
OPERATOR_REFERENCING,
|
|
||||||
OPERATOR_DEREFERENCING,
|
|
||||||
|
|
||||||
OPERATOR_CALL,
|
|
||||||
};
|
|
@ -1,51 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "utils/location.hh"
|
|
||||||
#include "lang/common.hh"
|
|
||||||
#include "lang/version.hh"
|
|
||||||
|
|
||||||
namespace ppc::lang {
|
|
||||||
enum def_type_kind_t {
|
|
||||||
TYPE_NONE,
|
|
||||||
TYPE_STRUCT,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct type_def_t;
|
|
||||||
|
|
||||||
// A structure, representing a ++C type notation
|
|
||||||
struct type_t {
|
|
||||||
// The type definition of which this type is
|
|
||||||
// If NULL, then this type is unknown
|
|
||||||
// Feel free to scream at the user if this is NULL
|
|
||||||
type_def_t *def;
|
|
||||||
};
|
|
||||||
// A structure, representing a field in a ++C struct
|
|
||||||
struct field_t {
|
|
||||||
// The type of which this field is
|
|
||||||
type_t type;
|
|
||||||
// The name of the field
|
|
||||||
const char *name;
|
|
||||||
// Whether or not the field is exported
|
|
||||||
bool is_exported;
|
|
||||||
};
|
|
||||||
|
|
||||||
// A structure, representing a ++C type (structs, classes, delegates and interfaces)
|
|
||||||
struct type_def_t {
|
|
||||||
// Whether or not this definition is exported
|
|
||||||
bool is_exported;
|
|
||||||
// The namespace of the type
|
|
||||||
namespace_name_t _namespace;
|
|
||||||
// The name of the type
|
|
||||||
const char *name;
|
|
||||||
// The version of the type (inherited from the module version)
|
|
||||||
version_t version;
|
|
||||||
// The location of the definition
|
|
||||||
location_t location;
|
|
||||||
|
|
||||||
// The alignment padding from the start of the structures, in bytes
|
|
||||||
// Used either for efficiency sake or to store private fields (or both)
|
|
||||||
std::size_t align_size;
|
|
||||||
// A list of all the type's fields
|
|
||||||
std::vector<field_t> fields;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user