1
0
forked from GitHub/gf-core

Add ExprMeta type, with two basic tests

This commit is contained in:
John J. Camilleri
2021-09-13 16:18:32 +02:00
parent d8a7aef46b
commit c5ce2fd4b7
5 changed files with 164 additions and 21 deletions

View File

@@ -37,8 +37,9 @@ PgfExpr elit(PgfUnmarshaller *this, PgfLiteral lit)
PgfExpr emeta(PgfUnmarshaller *this, PgfMetaId meta)
{
PyErr_SetString(PyExc_NotImplementedError, "emeta not implemented");
return 0;
ExprMetaObject *pyexpr = (ExprMetaObject *)pgf_ExprMetaType.tp_alloc(&pgf_ExprMetaType, 0);
pyexpr->index = PyLong_FromLong(meta);
return (PgfExpr) pyexpr;
}
PgfExpr efun(PgfUnmarshaller *this, PgfText *name)