瀏覽代碼

Yet more WIP geninfo.

Mark Sibly 7 年之前
父節點
當前提交
f4d0198d22
共有 3 個文件被更改,包括 12 次插入6 次删除
  1. 2 1
      src/mx2cc/mx2cc.monkey2
  2. 2 1
      src/mx2cc/parser.monkey2
  3. 8 4
      src/mx2cc/test.monkey2

+ 2 - 1
src/mx2cc/mx2cc.monkey2

@@ -188,7 +188,8 @@ Function GenInfo:Bool( args:String[] )
 	Builder.Parse()
 	
 	If opts.passes=1
-		gen.GenParseInfo()
+		gen.GenSemantInfo()
+'		gen.GenParseInfo()
 	Else
 		If Not Builder.errors.Length Builder.Semant()
 		gen.GenSemantInfo()

+ 2 - 1
src/mx2cc/parser.monkey2

@@ -30,7 +30,8 @@ Class Parser
 			Local name:=StripDir( srcPath )
 			Local path:=dir+name
 			
-			If GetFileType( path )=FileType.File srcPath=path
+			'use tmp file ONLY if newer than real file.
+			If GetFileType( path )=FileType.File And GetFileTime( path )>GetFileTime( srcPath ) srcPath=path
 				
 			gpath=StripExt( path )+".geninfo"
 		Endif

+ 8 - 4
src/mx2cc/test.monkey2

@@ -1,7 +1,11 @@
 
-#Import "<blah>"
+#Import "<box2d>"
+
+Using std..
+Using mojo..
+Using box2d..
 
 Function Main()
-	
-	Print "Hello World!"
-End
+	Test()
+    Print "monkey2 box2d text simple test"
+End