Created
July 26, 2011 00:08
-
-
Save felipensp/1105590 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --cc Makefile | |
index 87aa54d,7135b9e..0000000 | |
--- Makefile | |
+++ Makefile | |
@@@ -40,15 -42,15 +40,15 @@@ ifneq (,$(findstring MINGW,$(UNAME)) | |
OBJECTS=$(BUILDDIR)parser.o $(BUILDDIR)scanner.o $(BUILDDIR)driver.o \ | |
$(BUILDDIR)cstring.o $(BUILDDIR)double.o $(BUILDDIR)std_pkg.o \ | |
$(BUILDDIR)int.o $(BUILDDIR)io.o $(BUILDDIR)math.o \ | |
- $(BUILDDIR)pkgmanager.o $(BUILDDIR)compiler.o \ | |
+ $(BUILDDIR)file.o $(BUILDDIR)filestream.o $(BUILDDIR)pkgmanager.o $(BUILDDIR)compiler.o \ | |
- $(BUILDDIR)vm.o $(BUILDDIR)astvisitor.o $(BUILDDIR)opcode.o \ | |
+ $(BUILDDIR)vm.o $(BUILDDIR)cgvisitor.o $(BUILDDIR)opcode.o \ | |
$(BUILDDIR)string_type.o $(BUILDDIR)main.o $(BUILDDIR)win32.o | |
else | |
OBJECTS=$(BUILDDIR)parser.o $(BUILDDIR)scanner.o $(BUILDDIR)driver.o \ | |
$(BUILDDIR)cstring.o $(BUILDDIR)double.o $(BUILDDIR)std_pkg.o \ | |
$(BUILDDIR)int.o $(BUILDDIR)io.o $(BUILDDIR)math.o \ | |
- $(BUILDDIR)pkgmanager.o $(BUILDDIR)compiler.o \ | |
+ $(BUILDDIR)file.o $(BUILDDIR)filestream.o $(BUILDDIR)pkgmanager.o $(BUILDDIR)compiler.o \ | |
- $(BUILDDIR)vm.o $(BUILDDIR)astvisitor.o $(BUILDDIR)opcode.o \ | |
+ $(BUILDDIR)vm.o $(BUILDDIR)cgvisitor.o $(BUILDDIR)opcode.o \ | |
$(BUILDDIR)string_type.o $(BUILDDIR)main.o | |
endif | |
diff --cc compiler/cgvisitor.cc | |
index 88a5288,32b5d0d..0000000 | |
--- compiler/cgvisitor.cc | |
+++ compiler/cgvisitor.cc | |
@@@ -22,8 -22,8 +22,9 @@@ | |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
* OTHER DEALINGS IN THE SOFTWARE. | |
*/ | |
-#include "ast.h" | |
-#include "astvisitor.h" | |
+ | |
- #include "cgvisitor.h" | |
++#include "interpreter/ast.h" | |
++#include "interpreter/astvisitor.h" | |
#include "compiler/typetable.h" | |
#include "compiler/compiler.h" | |
diff --cc compiler/pkgmanager.cc | |
index 6cdd930,b229091..0000000 | |
--- compiler/pkgmanager.cc | |
+++ compiler/pkgmanager.cc | |
@@@ -33,8 -34,8 +34,8 @@@ namespace clever | |
/** | |
* Loads native packages | |
*/ | |
-void PackageManager::Init() throw() { | |
+void PackageManager::init() throw() { | |
- addPackage(CSTRING("std"), new std_pkg::Std()); | |
+ addPackage(CSTRING("std"), new packages::Std()); | |
} | |
/** | |
diff --cc modules/std/std_pkg.cc | |
index ba8098a,78150f3..0000000 | |
--- modules/std/std_pkg.cc | |
+++ modules/std/std_pkg.cc | |
@@@ -31,9 -33,10 +31,10 @@@ namespace clever { namespace packages | |
/** | |
* Initializes Std package | |
*/ | |
-void Std::Init() throw() { | |
+void Std::init() throw() { | |
- addModule(CSTRING("io"), new IOModule); | |
- addModule(CSTRING("math"), new Math); | |
+ addModule(CSTRING("io"), new std::IOModule); | |
+ addModule(CSTRING("math"), new std::Math); | |
+ addModule(CSTRING("file"), new std::File); | |
} | |
- }} // clever::std_pkg | |
+ }} // clever::packages | |
diff --git modules/std/file/file.cc modules/std/file/file.cc | |
index c674f81..6f35a73 100644 | |
--- modules/std/file/file.cc | |
+++ modules/std/file/file.cc | |
@@ -49,7 +49,7 @@ namespace file { | |
/** | |
* Initializes Standard module | |
*/ | |
-void File::Init() throw() { | |
+void File::init() throw() { | |
//const Type* string_type = TypeTable::getType(CSTRING("String")); | |
Class* filestream = new file::FileStream(); | |
filestream->Init(); | |
diff --git modules/std/file/file.h modules/std/file/file.h | |
index 9b4d69a..f0a57df 100644 | |
--- modules/std/file/file.h | |
+++ modules/std/file/file.h | |
@@ -41,7 +41,7 @@ public: | |
~File() { } | |
- void Init() throw(); | |
+ void init() throw(); | |
private: | |
DISALLOW_COPY_AND_ASSIGN(File); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment