@@ -0,0 +1,21 @@
+#Import "<mojo>"
+
+Using mojo..
+Function Test:Int()
+ Return 0
+End
+Global g:=Image.Load( "test.png" )'New Image( 256,256 )
+Function Main:Void()
+ Local x:Int
+ Local y:Int
+ Local z:int
+ If x<10
+ Local t:=100
+ Else
+ Local t:=20
+ Endif
@@ -25,7 +25,9 @@ Global StartDir:String
'Const TestArgs:="mx2cc makemods"
'Const TestArgs:="mx2cc makeapp src/mx2cc/test.monkey2"
Const TestArgs:="mx2cc makeapp -semant -geninfo src/mx2cc/test.monkey2"
+'Const TestArgs:="mx2cc makeapp -semant -geninfo modules/mojo3d/mojo3d.monkey2"
'Const TestArgs:="mx2cc makeapp -verbose src/mx2cc/catan/main.monkey2"
@@ -21,6 +21,13 @@ Class Parser
End
Method ParseFile:FileDecl( ident:String,srcPath:String,ppsyms:StringMap<String> )
+ If Builder.opts.geninfo
+ Local dir:=ExtractDir( srcPath )
+ Local name:=StripExt( StripDir( srcPath ) )
+ local path:=dir+".mx2/"+name+".monkey2"
+ If GetFileType( path )=FileType.File srcPath=path
_ppsyms=ppsyms