groovy
  1. groovy
  2. GROOVY-5310

Wrong line/col info for statements with whitespace before EOL

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: parser-antlr
    • Labels:
      None
    • Number of attachments :
      0

      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 Laforge 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 Laforge added a comment - Example test for the LineColumnChecker: ###excludeExtraWhitespaceInStatements::: 1 + 2 + 3 // bar :::[ExpressionStatement,(1:1),(1:10)][BinaryExpression,(1:1),(1:10)]

            People

            • Assignee:
              Unassigned
              Reporter:
              Guillaume Laforge
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: