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

Wrong line/col info for statements with whitespace before EOL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0-alpha-1
    • Component/s: parser-antlr
    • Labels:
      None

      Description

      If there are spaces at the end of a line statement, the space is also accounted in the lin / col info, instead of being the last (non-whitespace) character of the statement

        Issue Links

          Activity

          Hide
          Guillaume Guillaume Delcroix added a comment -

          Example test for the LineColumnChecker:

          ###excludeExtraWhitespaceInStatements:::
          1 + 2 + 3    // bar
          :::[ExpressionStatement,(1:1),(1:10)][BinaryExpression,(1:1),(1:10)]
          
          Show
          Guillaume Guillaume Delcroix added a comment - Example test for the LineColumnChecker: ###excludeExtraWhitespaceInStatements::: 1 + 2 + 3 // bar :::[ExpressionStatement,(1:1),(1:10)][BinaryExpression,(1:1),(1:10)]
          Hide
          daniel_sun Daniel Sun added a comment -

          Fixed in the parrot branch

          Show
          daniel_sun Daniel Sun added a comment - Fixed in the parrot branch

            People

            • Assignee:
              daniel_sun Daniel Sun
              Reporter:
              Guillaume Guillaume Delcroix
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development