diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-31 00:02:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-31 00:02:26 +0000 |
commit | 19fc9fd9a26973d87fad437ce549ffaba479df54 (patch) | |
tree | f40a9d2592b3cf827970c8bf54a1eebf9cc8f9c0 /Build/source/utils/asymptote/dec.h | |
parent | 24b3bac312553b2cc61e94fda581aba311967f5c (diff) |
asy 2.16 sources
git-svn-id: svn://tug.org/texlive/trunk@26734 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/dec.h')
-rw-r--r-- | Build/source/utils/asymptote/dec.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/dec.h b/Build/source/utils/asymptote/dec.h index e17c5fd114d..5b7f0756cc7 100644 --- a/Build/source/utils/asymptote/dec.h +++ b/Build/source/utils/asymptote/dec.h @@ -26,13 +26,13 @@ class access; namespace types { class ty; -class formal; -class signature; -class function; +struct formal; +struct signature; +struct function; } namespace vm { -class lambda; +struct lambda; } namespace absyntax { @@ -43,6 +43,8 @@ using trans::varEntry; using trans::access; using sym::symbol; +class vardec; + class ty : public absyn { public: ty(position pos) @@ -216,6 +218,10 @@ public: types::record *transAsFile(genv& ge, symbol id); + // If the block can be interpreted as a single vardec, return that vardec + // (otherwise 0). + vardec *asVardec(); + // A block is guaranteed to return iff one of the runnables is guaranteed to // return. // This is conservative in that @@ -352,6 +358,8 @@ public: // Translate, but add the names in as types rather than variables. virtual void transAsTypedefField(coenv &e, trans::tyEntry *base, record *r); + + decidstart *getStart() { return start; } }; class decidlist : public absyn { @@ -373,6 +381,15 @@ public: // Translate, but add the names in as types rather than variables. virtual void transAsTypedefField(coenv &e, trans::tyEntry *base, record *r); + + // If the list consists of a single entry, return it. + decid *singleEntry() + { + if (decs.size() == 1) + return decs.front(); + else + return 0; + } }; class dec : public runnable { @@ -413,6 +430,14 @@ public: // Translate, but add the names in as types rather than variables. virtual void transAsTypedefField(coenv &e, record *r); + + // If the vardec encodes a single declaration, return the name of that + // declaration (otherwise nullsym). + symbol singleName(); + + // If the vardec encodes a single declaration, return the type of that + // declaration (otherwise 0). + types::ty *singleGetType(coenv& e); }; struct idpair : public absyn { |