Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5635

SyntaxException.getEndColumn() returns "getStartColumn() + 1"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.1
    • 2.0.2, 2.1.0-beta-1
    • Compiler
    • None
    • Patch

    Description

      The exception org.codehaus.groovy.syntax.SyntaxException.getEndColumn() returns always getStartColumn() + 1.
      (you can check that in the source code)

      I'm trying to integrate the compiler to an IDE (JDeveloper) and I cannot get the error length to underline it properly.

      I'm sending you a patch that obtains the error length from all the ASTNode's.
      In the patch, I haven't deleted any unused constructor (even if it isn't used any more by the compiler) to maintain API backward compatibility.

      I would really appreciate if you could fix it from groovy 2.0.2 on.

      Attachments

        1. 0001-GROOVY-5635.-SyntaxException.getEndColumn-returns-ge.patch
          32 kB
          Ariel Morelli Andres
        2. git_diff.patch
          30 kB
          Ariel Morelli Andres
        3. SyntaxExceptionLastColumn.patch
          476 kB
          Ariel Morelli Andres

        Activity

          People

            paulk Paul King
            ariel.andres.morelli Ariel Morelli Andres
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: