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

Dollar slashy /$ string ending in backslash "breaks" the parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0.7
    • 3.0.8, 4.0.0-alpha-3
    • parser
    • None

    Description

      The minimal reproducer is the following:

      def s1 = $/Failing string\\/$
      def s2 = $/Will not be parsed as a new line/$
      
      println s1
      

      A line starting with def s2 will be "swallowed". The result of it is:

      Failing string\/$
              def s2 = /Will not be parsed as a new line
      

      It looks like \/$ is ignored by the parser and it's continuing until the next "valid" occurence of /$.

      It worked in 2.x

      Attachments

        Activity

          People

            paulk Paul King
            pbielicki Przemek Bielicki
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m