mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-10 05:29:30 -06:00
provide API to access the language code for the concrete language
This commit is contained in:
@@ -1654,6 +1654,12 @@ Concr_getName(ConcrObject *self, void *closure)
|
||||
return gu2py_string(pgf_concrete_name(self->concr));
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
Concr_getLanguageCode(ConcrObject *self, void *closure)
|
||||
{
|
||||
return gu2py_string(pgf_language_code(self->concr));
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
Concr_graphvizParseTree(ConcrObject* self, PyObject *args) {
|
||||
ExprObject* pyexpr;
|
||||
@@ -1683,6 +1689,10 @@ static PyGetSetDef Concr_getseters[] = {
|
||||
(getter)Concr_getName, NULL,
|
||||
"the name of the concrete syntax",
|
||||
},
|
||||
{"languageCode",
|
||||
(getter)Concr_getLanguageCode, NULL,
|
||||
"the language code for this concrete syntax",
|
||||
},
|
||||
{NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user