1
0
forked from GitHub/gf-core

Add ExprFun to Python bindings

This commit is contained in:
John J. Camilleri
2021-09-14 15:07:03 +02:00
parent 05813384e0
commit 6ebb8e5fda
6 changed files with 158 additions and 47 deletions

View File

@@ -11,7 +11,7 @@
typedef struct {
PyObject_HEAD
PyObject *hypos; // PyListObject of PyTupleObject: (bind_type: int, cid: string, type: TypeObject)
PyObject *cat; // PyStringObject
PyObject *cat; // PyUnicodeObject
PyObject *exprs; // PyListObject of ExprObject
} TypeObject;
@@ -23,21 +23,28 @@ typedef struct {
typedef struct {
PyObject_HEAD
PyObject *value;
PyObject *fun; // PyUnicodeObject
} ExprFunObject;
typedef struct {
PyObject_HEAD
PyObject *value; // PyLongObject | PyFloatObject | PyUnicodeObject
} ExprLitObject;
typedef struct {
PyObject_HEAD
PyObject *id;
PyObject *id; // PyLongObject
} ExprMetaObject;
typedef struct {
PyObject_HEAD
PyObject *index;
PyObject *index; // PyLongObject
} ExprVarObject;
extern PyTypeObject pgf_ExprType;
extern PyTypeObject pgf_ExprFunType;
extern PyTypeObject pgf_ExprLitType;
extern PyTypeObject pgf_ExprMetaType;