summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Context.h
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-30 14:59:30 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-30 14:59:30 +0100
commit39794ea7111f2508e8dc7504de4396bc570da03e (patch)
tree45e28bf95007405037f3d0d464787f574e30a6de /Sencha-lang/Context.h
parent93a63d43e950c53230c1658e86111ee962faf7f9 (diff)
downloadsencha-lang-39794ea7111f2508e8dc7504de4396bc570da03e.tar.gz
sencha-lang-39794ea7111f2508e8dc7504de4396bc570da03e.tar.bz2
sencha-lang-39794ea7111f2508e8dc7504de4396bc570da03e.zip
I began implementing function functionality and I apply some changes to
whole design.
Diffstat (limited to 'Sencha-lang/Context.h')
-rw-r--r--Sencha-lang/Context.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/Sencha-lang/Context.h b/Sencha-lang/Context.h
deleted file mode 100644
index 873de02..0000000
--- a/Sencha-lang/Context.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Context.h
- *
- * Created on: Dec 7, 2012
- * Author: attero
- */
-
-#ifndef CONTEXT_H_
-#define CONTEXT_H_
-#include <map>
-#include <vector>
-#include <string>
-#include <iostream>
-#include "AST/SenchaObject.h"
-#include "AST/ASTExpression.h"
-
-
-typedef unsigned long ObjectIndex;
-typedef unsigned long FunctionIndex;
-
-class Context {
-public:
- Context();
- typedef unsigned long ObjectIndex;
- ObjectIndex index;
-
- std::map<ObjectIndex, SenchaObject> object_store;
- ObjectIndex add_to_store(SenchaObject & object);
- SenchaObject get_from_store(ObjectIndex index);
-
- typedef SenchaObject (*PointerToNativeFunction)(std::vector<ASTExpression *>);
-
- std::map<std::string, PointerToNativeFunction> registered_functions;
-
- void register_function(std::string name, PointerToNativeFunction f);
-
- SenchaObject execute_native_function(std::string name, std::vector<ASTExpression *> arguments);
-
- //Overload it to use contexts
- void add(std::string name, SenchaObject object);
- void set(std::string name, SenchaObject object);
- SenchaObject get(std::string name);
- typedef std::map<std::string, ObjectIndex> ExecutionContext;
- ExecutionContext interpreter_context;
-
- std::string debug() ;
-
-
-
- ExecutionContext global_context;
- std::map<FunctionIndex , ExecutionContext *> function_contexts;
- virtual ~Context();
-};
-
-#endif /* CONTEXT_H_ */