Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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"]

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: