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

Visiting Empty expressions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 3.0.0-rc-1
    • Compiler
    • None

    Description

      We are trying to integrate some parts of the Groovy-Eclipse patch on the Groovy compiler back into the compiler itself. One such change is this.

      In GroovyCodeVisitor, there is no method to visit empty expressions. For consistency, we should be visiting every kind of expression.

      Please add this to GroovyCodeVisitor:

      void visitEmptyExpression(EmptyExpression expression); 
      

      and this to EmptyExpression inside of the otherwise empty visit method:

      visitor.visitEmptyExpression(this);
      

      I realize that this would break classes that currently implement GroovyCodeVisitor, but this is an inconsistency in your AST visitor pattern. So I am not sure of the best way to proceed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            werdna Andrew Eisenberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: