Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta-2
    • Component/s: lexer
    • Labels:
      None

      Description

      Rather than having a special RangeExpression 0..5 we could just make .. an operator.

      Then the .. operator on numbers could create a range and we can use this operator to do a 'traverse' on other objects. E.g. we can use .. to be like // in XPath.

      e.g.

      node = builder.foo() {
      bar()

      { x("a") x("b") }

      }
      node..x

      would yield [ x("a"), x("b") ]

      We could also use .. to invoke methods on collections of objects too.

      node..x..name() would yield ["a", "b"]

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          1346d 42m 1 Paul King 10/Jun/07 05:14
          Mark Thomas made changes -
          Workflow jira [ 12967785 ] Default workflow, editable Closed status [ 12975539 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
          Mark Thomas made changes -
          Workflow jira [ 12729178 ] Default workflow, editable Closed status [ 12741167 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
          Paul King made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          Assignee Paul King [ paulk ]
          Fix Version/s 1.1-beta-2 [ 10436 ]
          Hide
          Paul King added a comment -

          Syntax not required as GPath handles this use case.

          Show
          Paul King added a comment - Syntax not required as GPath handles this use case.
          Guillaume Delcroix made changes -
          Fix Version/s 1.1-beta-2 [ 10436 ]
          Hide
          John Wilson added a comment -

          GPath expressions use '.' for this functionality now. So node.x yields [x("a"), x("b")]

          Show
          John Wilson added a comment - GPath expressions use '.' for this functionality now. So node.x yields [x("a"), x("b")]
          Hide
          Jörg Gottschling added a comment -

          Seems as if this is implemented in the new ECMAScript4XML (E4X). I thing it would be nice to have this here.

          Show
          Jörg Gottschling added a comment - Seems as if this is implemented in the new ECMAScript4XML (E4X). I thing it would be nice to have this here.
          Jochen Theodorou made changes -
          Link This issue is depended upon by GROOVY-762 [ GROOVY-762 ]
          Jochen Theodorou made changes -
          Link This issue is depended upon by GROOVY-753 [ GROOVY-753 ]
          Jochen Theodorou made changes -
          Link This issue is depended upon by GROOVY-753 [ GROOVY-753 ]
          james strachan made changes -
          Fix Version/s 1.0-beta-4 [ 10243 ]
          Fix Version/s 1.1 [ 10436 ]
          Hide
          james strachan added a comment -

          Hmm, I'm not so sure about this now.

          Show
          james strachan added a comment - Hmm, I'm not so sure about this now.
          james strachan made changes -
          Assignee bob mcwhirter [ bob ]
          james strachan made changes -
          Affects Version/s 1.0-beta-2 [ 10241 ]
          Fix Version/s 1.0-beta-4 [ 10243 ]
          james strachan made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          james strachan created issue -

            People

            • Assignee:
              Paul King
              Reporter:
              james strachan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development