Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ParserAbstract.php

function ParserAbstract::completeNode

Completes a node by adding the end position

@codeCoverageIgnore

Parameters

Node\Node $node Node to complete:

Position $position Node's end position:

Return value

mixed It actually returns a Node but mixed solves a lot of PHPDoc problems

75 calls to ParserAbstract::completeNode()
Parser::expressionToPattern in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Converts an expression node to a pattern node
Parser::parse in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses the source
Parser::parseArgumentList in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses an arguments list
Parser::parseArrayBindingPattern in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses an array binding pattern
Parser::parseArrayLiteral in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses an array literal

... See full list

File

vendor/mck89/peast/lib/Peast/Syntax/ParserAbstract.php, line 268

Class

ParserAbstract
Base class for parsers.

Namespace

Peast\Syntax

Code

protected function completeNode(Node\Node $node, $position = null) {
    
    //Add the node end position
    $node->location->end = $position ?: $this->scanner
        ->getPosition();
    
    //Emit the NodeCompleted event for the node
    $this->eventsEmitter && $this->eventsEmitter
        ->fire("NodeCompleted", array(
        $node,
    ));
    return $node;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal