aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/resp.hpp18
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);