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

Wrong line/col info for GStrings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0-alpha-1
    • parser-antlr2
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              guillaume Guillaume Sauthier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: