Riverside-Software / sonar-openedge

CABL (Code Analyzer for ABL in SonarQube) - ABL ANTLR4 Parser
https://riverside-software.fr
GNU Lesser General Public License v3.0
63 stars 26 forks source link

Parser Error with unquoted generics #1135

Closed clement-brodu closed 3 months ago

clement-brodu commented 3 months ago

Hello,

Our versions:

We have a parser error with generic classes :

Syntax error -- Src/Sonar/ParserGenerics.cls:10:82 -- Mismatched input ',' expecting { LEFTANGLE, RIGHTANGLE }
Parser error in '[uri=file:/D:/Openedge/workspace-oe12/dev/Src/Sonar/ParserGenerics.cls]' at position Src/Sonar/ParserGenerics.cls:10:82
BLOCK-LEVEL ON ERROR UNDO, THROW.

CLASS Sonar.ParserGenerics:

    METHOD PUBLIC VOID Demo(  ):
        DEFINE VARIABLE v AS INTEGER NO-UNDO.
        /* This line is OK ->*/
        DEFINE VARIABLE vDico1 AS "System.Collections.Generic.Dictionary<CHARACTER, CHARACTER>" NO-UNDO.
        /* This line break the parser ->*/
        DEFINE VARIABLE vDico2 AS System.Collections.Generic.Dictionary<CHARACTER, CHARACTER> NO-UNDO.

   END METHOD. 

END CLASS.
gquerret commented 3 months ago

This is fixed in 2.27.1 (issue #1134)