FIXED: Function parameter parsing bug

Jungle Ide Home Forums Historic logs Fixed Bugs log FIXED: Function parameter parsing bug

This topic contains 2 replies, has 2 voices, and was last updated by  Goodlookinguy 5 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #5553


    The comma used to separate a generic classes types is breaking the parser and thus the intellisense in turn.

    Function Example( a:CExample<Int,Int>, b, c )
    Function Main:Int()
    	'                       v
    	Example(New CExample<Int,Int>(), 3, 3)
    Class CExample<A,B>


    That’s very complicated to fix! mmmm I’ll be able to minimize it for next version, so both the cases you’re describing will not break the parser, but more complex expression with generics could be complicated to parse properly because of the happy idea of using < and > for generics.
    It was a bad idea in C++, a bad idea to keep it on Java, a good idea to remove them from D and VB, but Mark considered it was nice to keep like C++ on Monkey.

    Situations like this one:

    MyFunctionCall(MySomething<Identifier1, Identifier2>(MyValue))

    Are too ambiguous. Are there 2 boolean parameters or a cast from MyValue, to a class with 2 generics? Impossible to know unless a complete lexing is done, which can be very slow.

    I’ll try to completely fix this, but it can be a bit complicated to get right always while not affecting parsing speed in any way.



    I see your point about the ambiguity. Surprisingly I never noticed it before. Good luck trying to fix this though.

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

The topic ‘FIXED: Function parameter parsing bug’ is closed to new replies.