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

yield keyword

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-3
    • ast builder, lexer, parser
    • None

    Description

      add yield keyword to support continuations.

      e.g.

      // simple way to implement an iterator
      foo()

      { yield 1; yield 2; yield 3; }

      // or
      foo() {
      for i in bar {
      if i.whatnot == 7

      { yield i; }

      }
      }

      Attachments

        Activity

          People

            bob Bob Paulin
            bob Bob Paulin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified