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

Patches for line / colum information for various AST Nodes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6-beta-1
    • Fix Version/s: 1.5.6, 1.6-beta-1
    • Component/s: parser
    • Labels:
      None
    • Flags:
      Patch

      Description

      as announced before (groovy-eclipse mailinglist) we created some patches for the groovy core and the grammar. The changes affect line / column information of various AST nodes, we needed to fix these four our project where we're working on a refactoring feature for groovy-eclipse.

      The changes are described in our report that is available on http://sifsstud4.hsr.ch/groovy-refactoring.pdf

      description of the three patch files:

      coreChanges.patch:

      • added method getOriginType() to the Interface "Variable.java" (Description in Chapter: 5.5.2.3 Primitive Types)
      • calling setReturnType(returnType) from c'tor in "MethodNode.java", extended this method (Description in Chapter: 5.5.2.5 Dynamic Return Types)
      • left expression col. infos where to long in declaration expression node (Description in Chapter: 5.5.2.1 Declaration)
      • initial expression col. infos were wrong in field node (Description in Chapter: 5.5.2.2 FieldNode)
      • Changed the collection in "AnnotatedNode.java" to a LinkedHashMap, this way we were able to write the annotations back in the order they we're written.

      newTests.patch:

      • file contains new tests to test the getOriginType() method in the class VariableExpression
      • the 2nd testclass tests the DynamicReturnType information of methodNodes
      • adding tests to suite

      grammarChanges.patch:

      • changes are described in Chapter: 5.5.1 Grammar Changes

        Attachments

        1. testDatenGrammarPatch.patch
          5 kB
          Martin Kempf
        2. newTests.patch
          6 kB
          Reto Kleeb
        3. grammarChanges.patch
          18 kB
          Reto Kleeb
        4. coreChanges.patch
          6 kB
          Reto Kleeb

          Issue Links

            Activity

              People

              • Assignee:
                blackdrag Jochen Theodorou
                Reporter:
                rkleeb Reto Kleeb
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: