From 6a36ce77fff65076707126fc6803b3b010bed2f7 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Mon, 11 Feb 2013 15:51:26 +0000 Subject: the class PgfConcr from the Python binding now has a property name which returns the name of the concrete syntax --- src/runtime/c/pgf/pgf.c | 6 ++++++ src/runtime/c/pgf/pgf.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'src/runtime/c') diff --git a/src/runtime/c/pgf/pgf.c b/src/runtime/c/pgf/pgf.c index 898d3be05..f0da5bddf 100644 --- a/src/runtime/c/pgf/pgf.c +++ b/src/runtime/c/pgf/pgf.c @@ -109,6 +109,12 @@ pgf_get_language(PgfPGF* pgf, PgfCId lang) return gu_map_get(pgf->concretes, &lang, PgfConcr*); } +GuString +pgf_concrete_name(PgfConcr* concr) +{ + return concr->name; +} + void pgf_iter_categories(PgfPGF* pgf, GuMapItor* fn, GuExn* err) { diff --git a/src/runtime/c/pgf/pgf.h b/src/runtime/c/pgf/pgf.h index 032834d77..ef68e651f 100644 --- a/src/runtime/c/pgf/pgf.h +++ b/src/runtime/c/pgf/pgf.h @@ -91,6 +91,9 @@ pgf_iter_languages(PgfPGF*, GuMapItor*, GuExn* err); PgfConcr* pgf_get_language(PgfPGF*, PgfCId lang); +GuString +pgf_concrete_name(PgfConcr*); + void pgf_iter_categories(PgfPGF* pgf, GuMapItor* fn, GuExn* err); -- cgit v1.2.3