FIXED: New := problems and module parsing issues

Jungle Ide Home Forums Historic logs Fixed Bugs log FIXED: New := problems and module parsing issues

This topic contains 4 replies, has 2 voices, and was last updated by  Ziggy 5 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4792

    Goodlookinguy
    Participant

    I’m not really sure which update changed things (because I was on vacation for a while), but it seems like new problems have arisen in the parser. Take a look at this picture.

    Here’s the code if you want to try it for yourself.

    Import mojo
    
    Function LoadSound:Int()
    	Print "hi"
    	Return 1
    End
    
    Function LoadSound:Sound( path$ )
    	Return mojo.LoadSound(path)
    End
    
    Function Main:Int()
    	New Example()
    End
    
    Class Example Extends App
    	Method OnCreate:Int()
    		SetUpdateRate(30)
    		
    		Local a := LoadSound()
    		Local b := LoadSound("hello.mp3")
    		
    	End
    	
    	Method OnUpdate:Int()
    		
    	End
    	
    	Method OnRender:Int()
    		Cls()
    		
    	End
    End
    #4794

    Ziggy
    Keymaster

    The spaces between the identifier and the : is confusing the parser. I’ll fix this for the next release.
    Thanks!

    Working code:

    Import mojo
    
    Function LoadSound:Int()
    	Print "hi"
    	Return 1
    End
    
    Function LoadSound:Sound( path$ )
    	Return mojo.LoadSound(path)
    End
    
    Function Main:Int()
    	New Example()
    End
    
    Class Example Extends App
    	Method OnCreate:Int()
    		SetUpdateRate(30)
    		
    		Local a:= LoadSound()
    		Local b:= LoadSound("hello.mp3")
    		
    	End
    	
    	Method OnUpdate:Int()
    		
    	End
    	
    	Method OnRender:Int()
    		Cls()
    		
    	End
    End
    #4798

    Ziggy
    Keymaster

    It’s been already fixed for the next version (also fixed other several small issues)

    #4799

    Goodlookinguy
    Participant

    Cool. Oh, and did the issue with ‘mojo.LoadSound’ with the ‘LoadSound’ part not being colored also get fixed?

    #4886

    Ziggy
    Keymaster

    The LoadSound function is not defined in mojo but in audio wich is imported by mojo, so it should be audio.LoadSound. The compiler seems to make additional search when binding the identifier but not sure if adding this to the ide parser is a good idea performance wise.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘FIXED: New := problems and module parsing issues’ is closed to new replies.