Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

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

Closed
isapir opened this issue Aug 15, 2012 · 0 comments
Closed

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

isapir opened this issue Aug 15, 2012 · 0 comments

Comments

@isapir
Copy link

isapir commented Aug 15, 2012

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants