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/stm.h | |
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/stm.h')
-rw-r--r-- | Build/source/utils/asymptote/stm.h | 232 |
1 files changed, 0 insertions, 232 deletions
diff --git a/Build/source/utils/asymptote/stm.h b/Build/source/utils/asymptote/stm.h deleted file mode 100644 index 3f8d426014b..00000000000 --- a/Build/source/utils/asymptote/stm.h +++ /dev/null @@ -1,232 +0,0 @@ -/***** - * stm.h - * Andy Hammerlindl 2002/8/30 - * - * Statements are objects in the language that do something on their - * own. Statements are different from declarations in that statements - * do not modify the environment. Translation of a statements puts the - * stack code to run it into the instruction stream. - *****/ - -#ifndef STM_H -#define STM_H - -#include "types.h" -#include "symbol.h" -#include "dec.h" - -namespace trans { -class coenv; -} - -namespace absyntax { - -using trans::coenv; -using sym::symbol; - -class stm : public runnable { -public: - stm(position pos) - : runnable(pos) {} - - void prettyprint(ostream &out, Int indent); - - void transAsField(coenv &e, record *) { - // Ignore the record. - trans(e); - } - - void trans(coenv &e) = 0; -}; - -class emptyStm : public stm { -public: - emptyStm(position pos) - : stm(pos) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &) {} -}; - -// Wrapper around a block to use it as a statement. -class blockStm : public stm { - block *base; - -public: - blockStm(position pos, block *base) - : stm(pos), base(base) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e) { - return base->trans(e); - } - - // A block is guaranteed to return iff its last statement is - // guaranteed to return. - bool returns() { - return base->returns(); - } - -}; - -// A statement that consist of a single expression to evaluate. -class expStm : public stm { - exp *body; - -public: - expStm(position pos, exp *body) - : stm(pos), body(body) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); - - // Should be called when running an expStm at the interactive prompt. - // The code will "write" the value of the expression at the prompt if - // possible. - void interactiveTrans(coenv &e); -}; - -class ifStm : public stm { - exp *test; - stm *onTrue; - stm *onFalse; - -public: - ifStm(position pos, exp *test, stm* onTrue, stm* onFalse = 0) - : stm(pos), test(test), onTrue(onTrue), onFalse(onFalse) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); - - // An if statement is guaranteed to return iff both its pieces are - // guaranteed to return. - bool returns() { - if (onTrue == 0 || onFalse == 0) - return false; - return onTrue->returns() && onFalse->returns(); - } -}; - -class whileStm : public stm { - exp *test; - stm *body; - -public: - whileStm(position pos, exp *test, stm *body) - : stm(pos), test(test), body(body) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - -class doStm : public stm { - stm *body; - exp *test; - -public: - doStm(position pos, stm *body, exp *test) - : stm(pos), body(body), test(test) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - -class forStm : public stm { - runnable *init; - exp *test; - runnable *update; - stm *body; - -public: - forStm(position pos, runnable *init, exp *test, runnable *update, stm *body) - : stm(pos), init(init), test(test), update(update), body(body) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - -class extendedForStm : public stm { - ty *start; - symbol var; - exp *set; - - stm *body; - -public: - extendedForStm(position pos, ty *start, symbol var, exp *set, stm *body) - : stm(pos), start(start), var(var), set(set), body(body) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - - -class breakStm : public stm { -public: - breakStm(position pos) - : stm(pos) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - -class continueStm : public stm { -public: - continueStm(position pos) - : stm(pos) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - -class returnStm : public stm { - exp *value; - -public: - returnStm(position pos, exp *value = 0) - : stm(pos), value(value) {} - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); - - // A return statement is, of course, guaranteed to return. - bool returns() { - return true; - } -}; - - -// Used at the start of for loops. -class stmExpList : public stm { - mem::list<stm *> stms; - -public: - stmExpList(position pos) - : stm(pos) {} - - // To ensure list deallocates properly. - virtual ~stmExpList() {} - - void add(stm *s) { - stms.push_back(s); - } - - void prettyprint(ostream &out, Int indent); - - void trans(coenv &e); -}; - -} // namespace absyntax - -#endif |