Skip to content
This repository

ANTLR parser doesn't recognize Railo's === operator #8

Open
dev-21solutions opened this Issue August 15, 2012 · 0 comments

1 participant

dev-21solutions
dev-21solutions

the ANTLR parser doesn't recognize Railo's === operator (reference equals) and thus throwing an error which then prevents the CFC's outline from being displayed.

it would have been ok for now if code collapse would have worked on functions in CFCs but that doesn't work either, so a CFC with quite a few functions is hard to manage.

also, the error is shown with the function declaration so it is harder to decipher. it would be much better if the error was next to the === symbol.

see example code in a function that requires a reference equals test:

/**
* returns the 1-based index of the eventHandler or 0 if not found; called by addEventHander() and removeEventHandler()
*/
private int function findEventHandler( required array handlers, required eventHandler ) {

    if ( !isCustomfunction( eventHandler ) )
        throw( type="IllegalArgument", message="eventHandler must be a user defined function" );

    for ( var i=1; i <= arrayLen( handlers ); i++ ) {

        if ( handlers[ i ] === eventHandler )
            return i;
    }

    return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.