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

Parser fails to recognize token sequence expression newline bitwise-operator expression

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.16
    • Fix Version/s: None
    • Component/s: parser
    • Labels:
      None

      Description

      Consider the following:

      1
      | 2
      
      // or
      
      true
      | false
      
      // or
      
      []
      | whatever
      

      Each of these expression statements are generating an unexpected token exception at "|". This is significant because this type of expression sequence is often used to build Spock data tables. If user adds newline by accident or formatter does so automatically, the table is no longer recognized and compilation fails.

      This came to me by way of: https://github.com/groovy/groovy-eclipse/issues/822

      Possibly related: GROOVY-8810

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              emilles Eric Milles
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: