diff options
author | Denis Bitouzé <dbitouze@wanadoo.fr> | 2021-02-25 18:23:07 +0000 |
---|---|---|
committer | Denis Bitouzé <dbitouze@wanadoo.fr> | 2021-02-25 18:23:07 +0000 |
commit | c6101f91d071883b48b1b4b51e5eba0f36d9a78d (patch) | |
tree | 1bf7f5a881d7a4f5c5bf59d0b2821943dd822372 /Build/source/utils/asymptote/varinit.cc | |
parent | 07ee7222e389b0777456b427a55c22d0e6ffd267 (diff) |
French translation for tlmgr updated
git-svn-id: svn://tug.org/texlive/trunk@57912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/varinit.cc')
-rw-r--r-- | Build/source/utils/asymptote/varinit.cc | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/Build/source/utils/asymptote/varinit.cc b/Build/source/utils/asymptote/varinit.cc deleted file mode 100644 index 347b5960c7b..00000000000 --- a/Build/source/utils/asymptote/varinit.cc +++ /dev/null @@ -1,80 +0,0 @@ -/***** - * varinit.cc - * Andy Hammerlindl 2005/07/01 - * - * Variable initializer are syntax that finish code such as - * int var = ... - * As such, they are translated to yield a certain type, the type of the - * variable. Expressions are a special case that can be translated without an - * associated variable or its type. - *****/ - -#include "varinit.h" -#include "coenv.h" -#include "runtime.h" -#include "runarray.h" - -namespace absyntax { - -using namespace types; -using namespace trans; - -void definit::prettyprint(ostream &out, Int indent) -{ - prettyname(out, "definit",indent); -} - -void definit::transToType(coenv &e, types::ty *target) -{ - if (target->kind != ty_error) { - access *a=e.e.lookupInitializer(target); - - if (a) - a->encode(CALL, getPos(), e.c); - else { - em.error(getPos()); - em << "no default initializer for type '" << *target << "'"; - } - } -} - -void arrayinit::prettyprint(ostream &out, Int indent) -{ - prettyname(out, "arrayinit",indent); - - for (mem::list<varinit *>::iterator p = inits.begin(); p != inits.end(); ++p) - (*p)->prettyprint(out, indent+2); - if (rest) - rest->prettyprint(out, indent+1); -} - -void arrayinit::transMaker(coenv &e, Int size, bool rest) { - // Push the number of cells and call the array maker. - e.c.encode(inst::intpush, size); - e.c.encode(inst::builtin, rest ? run::newAppendedArray : - run::newInitializedArray); -} - -void arrayinit::transToType(coenv &e, types::ty *target) -{ - types::ty *celltype; - if (target->kind != types::ty_array) { - em.error(getPos()); - em << "array initializer used for non-array"; - celltype = types::primError(); - } - else { - celltype = ((types::array *)target)->celltype; - } - - // Push the values on the stack. - for (mem::list<varinit *>::iterator p = inits.begin(); p != inits.end(); ++p) - (*p)->transToType(e, celltype); - - if (rest) - rest->transToType(e, target); - - transMaker(e, (Int)inits.size(), (bool)rest); -} - -} // namespace absyntax |