diff options
author | David Robillard <d@drobilla.net> | 2010-12-04 08:03:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-04 08:03:12 +0000 |
commit | d68d9bcf0f2ac65f5f9a3ab92216a11dafa8f2ea (patch) | |
tree | 4ad2bf2c9c28c6cad2601b88ec9e864eba5615c0 | |
parent | 78cdf2fcc7ae3ca7773d0da1328dbc256e99dcb3 (diff) | |
download | resp-d68d9bcf0f2ac65f5f9a3ab92216a11dafa8f2ea.tar.gz resp-d68d9bcf0f2ac65f5f9a3ab92216a11dafa8f2ea.tar.bz2 resp-d68d9bcf0f2ac65f5f9a3ab92216a11dafa8f2ea.zip |
Tidy.
git-svn-id: http://svn.drobilla.net/resp/resp@292 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | src/resp.hpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/resp.hpp b/src/resp.hpp index a3f56f5..12d2ca0 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -166,7 +166,7 @@ private: /// Garbage collected object (including AST and runtime data) struct Object { struct Header { - uint32_t tag; ///< Rightmost bit is mark + uint32_t tag; ///< Least significant bit is mark }; inline Tag tag() const { return (Tag)((header()->tag >> 1) << 1); } @@ -197,16 +197,8 @@ private: * Abstract Syntax Tree * ***************************************************************************/ -struct TEnv; ///< Type-Time Environment -struct Constraints; ///< Type Constraints -struct Subst; ///< Type substitutions -struct CEnv; ///< Compile-Time Environment - -struct AST; -extern ostream& operator<<(ostream& out, const AST* ast); - -typedef list<AST*> Code; - +struct TEnv; ///< Type-Time Environment +struct CEnv; ///< Compile-Time Environment struct ATuple; struct ASymbol; struct AType; @@ -271,6 +263,8 @@ struct AST : public Object { Cursor loc; }; +extern ostream& operator<<(ostream& out, const AST* ast); + template<typename T> static T* tup(Cursor c, AST* ast, ...) { @@ -929,6 +923,8 @@ private: * EVAL/REPL/MAIN * ***************************************************************************/ +typedef list<AST*> Code; + void pprint(std::ostream& out, const AST* ast, CEnv* cenv, bool types); void initLang(PEnv& penv, TEnv& tenv); int eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute); |