groovy
  1. groovy
  2. GROOVY-5311

Wrong line/col info for GStrings

    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

      GStrings have problems with their various sub parts: the constant strings and the variables interpolated.
      With this example:

      def gs1 = "-$a-${b}-${->c}-"
      

      The first constant string represents "-$ instead of just the minus sign.
      The second and third constant are -$ instead of just the minus sign again.
      And the last constant is -", instead of just the minus sign, it's going one character too far.
      Now on to the variables.
      Variable a is okay.
      Varible b is actually

      {b}

      and I think it should be just b
      And the closure expression is jut right too.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated: