About Monkey 2 › Forums › Monkey 2 Development › Mark – mx2cc just parse without compile?
This topic contains 6 replies, has 4 voices, and was last updated by 
 AdamStrange
 2 years, 8 months ago.
- 
		AuthorPosts
 - 
		
			
				
August 5, 2016 at 1:30 pm #2791
Mark is it possible to just parse with mx2cc and go no further – no compile, etc
The reason for this would be to use it as a true code checker without any other overhead.
it this possible?
August 5, 2016 at 3:07 pm #2796I would also like to see this unless it is proves to be a massive task. I think anyone working on an IDE, code tools or other external tools would benefit – seems something useful for Ted as well.
August 5, 2016 at 6:36 pm #2799In the mx2cc source (main file) under “Local builder:=New Builder( opts )” keep the builder.parse() and builder.semant() but remove translate and compile.
Should do the trick
August 6, 2016 at 6:09 am #2814mmm, ok. I’ll have a looksee and report back
August 6, 2016 at 7:01 am #2817ok, checked and mx2cc changed and rebuilt:
in function main()
line 55=
Monkey12Print "Usage: mx2cc makeapp|makemods|makedocs|checkapp [-run] [-clean] [-verbose] [-target=desktop|emscripten] [-config=debug|release] source|modules..."new lines 71,72=
Monkey123Case "makeapp"MakeApp( args )add new function:
Monkey1234567891011121314151617181920212223242526272829303132333435363738Function CheckApp( args:String[] )Local opts:=New BuildOptsopts.productType="app"opts.appType="gui"opts.target="desktop"opts.config="debug"opts.clean=Falseopts.fast=Trueopts.run=trueopts.verbose=0args=ParseOpts( opts,args )If args.Length<>1 Fail( "Invalid app source file" )Local cd:=CurrentDir()ChangeDir( StartDir )Local srcPath:=RealPath( args[0].Replace( "\","/" ) )ChangeDir( cd )opts.mainSource=srcPathPrint ""Print "***** Checking app '"+opts.mainSource+"' *****"Print ""Local builder:=New Builder( opts )builder.Parse()If builder.errors.Length Returnbuilder.Semant()If builder.errors.Length ReturnPrint "Application Checked"EndWhat this will do is add a compile option of checkapp to mx2cc so instead of makeup, you checkapp
Mark. I’ll add this to the github request as well
August 6, 2016 at 8:48 am #2821I was missing this as well. Including a Code Listbox like in Ted1.
August 6, 2016 at 9:10 am #2822a Code Listbox like in Ted1
Could you give me more details on this, possibly a pic as well?
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.