From 662a35bbb3724edab3647937411a079f52bd59c6 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 16 Aug 2013 12:54:16 +0000 Subject: provide API to access the language code for the concrete language --- src/runtime/python/pypgf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/runtime/python/pypgf.c') 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 @@ -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 */ }; -- cgit v1.2.3