diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-08-16 12:54:16 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-08-16 12:54:16 +0000 |
| commit | 662a35bbb3724edab3647937411a079f52bd59c6 (patch) | |
| tree | 9eb57d63e20a63c975d3217b130b69d1d27d8b94 /src/runtime/python | |
| parent | 1e44fdb3d3413709ae635f0fae91ffa4a93a2d9d (diff) | |
provide API to access the language code for the concrete language
Diffstat (limited to 'src/runtime/python')
| -rw-r--r-- | src/runtime/python/pypgf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index d54dd14ad..fd2b39906 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -1655,6 +1655,12 @@ Concr_getName(ConcrObject *self, void *closure) } 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; if (!PyArg_ParseTuple(args, "O!", &pgf_ExprType, &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 */ }; |
