Scans sub-expressions of elements, e.g. a text-block
initiated with a dot (.) or a block expansion.

Yields whatever scanTextBlock() and scanExpansion() yield

@return \Generator
512190
protected function scanSub()
    {

        //Escaped text after
        if ($this->peek(2) === '! ') {

            $this->consume();

            foreach ($this->scanText(true) as $token)
                yield $token;
        }

        if ($this->match('([!]?)\.')) {

            $this->consumeMatch();

            foreach ($this->scanTextBlock($this->getMatch(1) === '!') as $token)
                yield $token;
        }

        foreach ($this->scanExpansion() as $token)
            yield $token;
    }
444394
public function getBogusContent()
    {
        $generator = $this->documentGenerator->getInlineGenerator('textline');
        $generator->addRawContent($this->beginTag);
        $m = count($this->contents) - 1;
        $s = count($this->separators);
        foreach ($this->contents as $k => $v) {
            if ($this->attribute[$k] == '$$') {
                foreach ($this->generator->getChildGenerators() as $child) {
                    $generator->addContent($child);
                }
            } else {
                $generator->addRawContent($v);
            }
            if ($k < $m) {
                if ($k < $s) {
                    $generator->addRawContent($this->separators[$k]);
                } else {
                    $generator->addRawContent(end($this->separators));
                }
            }
        }

        return $generator;
    }
1053484
protected function _scanner()
    {
        if (isset($this->_scanner)) {
            return $this->_scanner;
        }
        $this->_scanner = new AssetScanner(
            $this->_settings['paths'],
            isset($this->_settings['theme']) ? $this->_settings['theme'] : null
        );

        return $this->_scanner;
    }
834099
protected function get()
    {
        $a = 0;
        $b = 1;
        $to = $this->getMaxLimit();
        while (0 < $to) {
            yield $a;

            list($a, $b) = [$b, $a + $b];
            --$to;
        }
    }
489256
public function generate()
    {
        $code = array();

        if ($this->namespace !== null) {
            $code[] = $this->getIndentation() . 'namespace ' . $this->namespace;
            $code[] = '{';
            $code[] = null;

            // Temporarily add one more level of indentation.
            $this->addIndentationLevel(1);
        }

        $doc = $this->generateDocumentation();
        if ($doc !== null) {
            $code[] = $doc;
        }

        $code[] = $this->generateSignature();
        $code[] = $this->getIndentation() . $this->generateBody();

        if ($this->namespace !== null) {
            // Set back the indentation.
            $this->addIndentationLevel(-1);

            $code[] = $this->getIndentation() . '}';
        }

        return implode($this->getLineFeed(), $code);
    }
1346624
private function _yield() {
    $node = new YieldNode();
    $this->mustMatch(T_YIELD, $node);
    $expr = $this->expr();
    if ($this->tryMatch(T_DOUBLE_ARROW, $node)) {
      $node->addChild($expr, 'key');
      $node->addChild($this->expr(), 'value');
    }
    else {
      $node->addChild($expr, 'value');
    }
    return $node;
  }
802154
public function getBogusContent()
    {
        $generator = $this->documentGenerator->getInlineGenerator('textline');
        $generator->addRawContent($this->beginTag);
        foreach ($this->generator->getChildGenerators() as $child) {
            $generator->addContent($child);
        }
        return $generator;
    }
889096
public function fetchAllGenerator(): Generator
    {
        if (!$this->wasExecuted()) {
            $this->exec();
        }

        $statement = $this->getAdapter()->getStatement();

        while ($record = $statement->fetch(PDO::FETCH_ASSOC)) {
            yield $record;
        }

        $statement->closeCursor();
    }
896667
public function StringExpression()
    {
        $peek = $this->lexer->glimpse();

        // Subselect
        if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && $peek['type'] === Lexer::T_SELECT) {
            $this->match(Lexer::T_OPEN_PARENTHESIS);
            $expr = $this->Subselect();
            $this->match(Lexer::T_CLOSE_PARENTHESIS);

            return $expr;
        }

        // ResultVariable (string)
        if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER) &&
            isset($this->queryComponents[$this->lexer->lookahead['value']]['resultVariable'])) {
            return $this->ResultVariable();
        }

        return $this->StringPrimary();
    }
771336
public function getIterator(): Traversable
    {
        foreach ($this->values as $index => &$value) {
            yield $this->keys[$index] => $value;
        }
    }
1099121
public function getIterator()
    {
        $iterator   = parent::getIterator();
        $content    = $this->getDependentContent();

        if ( $content )
        {
            $iterator->append( new ArrayIterator( array(
                'rootTitle' => $content->title,
            ) ) );
        }

        return $iterator;
    }
14408
public function getIterator()
    {
        $iteration_result = array();
        if (\is_array($this->nodes)) {
            foreach ($this->nodes as $node) {
                $iteration_result[] = $this->createChildInstance($node);
            }
        }

        return new \ArrayIterator($iteration_result);
    }
509942
public function getIterator(): Generator
    {
        foreach ($this->packageRoots as $root) {
            $rootPaths = [];
            $packages = [];

            // Search each namespace we've been provided.
            foreach ($this->namespaces as $namespace) {

                // Try to find the root within this namespace.
                // If we find it, aggregate the paths to scan for packages later.
                $package = $namespace->findNamespace($root);
                if ($package) {
                    $rootPaths = array_merge($rootPaths, $package->getPaths());
                }

                // If the namespace itself is actually a package within the root we're searching for,
                // aggregate it's path to scan as a package for later.
                if ($namespace->getParentId() === $root) {
                    if (!array_key_exists($namespace->getId(), $packages)) {
                        $packages[$namespace->getId()] = [];
                    }
                    $packages[$namespace->getId()] = array_merge(
                        $packages[$namespace->getId()],
                        $namespace->getPaths()
                    );
                }
            }

            // If we found any root paths, scan them for packages.
            if ($rootPaths) {
                $namespace = new Psr4Namespace($root, ...$rootPaths);
                yield from $this->scanRoot($namespace);
            }

            // If we found any package paths, scan them.
            foreach ($packages as $id => $paths) {
                $namespace = new Psr4Namespace($id, ...$paths);
                yield from $this->loadPackage($namespace);
            }
        }
    }
864010
private function getSubmitStateNodeList() : Generator
    {
        $xpath    = new DOMXPath($this->document);
        $nodeList = $xpath->query('//input[@type="submit"] | //button[@type="submit"]');

        /** @var DOMElement $node */
        foreach ($nodeList as $node) {
            $name = $node->getAttribute('name');
            if (! $name) {
                // At least a name is needed to submit a value.
                continue;
            }

            yield $name;
        }
    }
375812
protected function _getIterator()
    {
        foreach(array_keys($this->properties) as $key)
            yield $key => $this->__get($key);
    }
843706
protected function getRegex()
    {
        if ($this->regex === null) {
            $this->regex = $this->buildRegex($this->getTokens(), $this->constraints);
        }

        return $this->regex;
    }
1257869
public function getChildNodes() : \Generator {
        foreach ($this::CHILD_NAMES as $name) {
            $val = $this->$name;
            if (\is_array($val)) {
                foreach ($val as $child) {
                    if ($child instanceof Node) {
                        yield $child;
                    }
                }
                continue;
            } elseif ($val instanceof Node) {
                yield $val;
            }
        }
    }