Corresponds to both FragmentSpread and InlineFragment in the spec.

@return \Fubhy\GraphQL\Language\Node\FragmentSpread|\Fubhy\GraphQL\Language\Node\InlineFragment
777791
protected function parseFragment()
    {
        $start = $this->token->getStart();
        $this->expect(Token::SPREAD_TYPE);

        if ($this->token->getValue() === 'on') {
            $this->advance();

            return new InlineFragment(
                $this->parseNamedType(),
                $this->parseDirectives(),
                $this->parseSelectionSet(),
                $this->location($start)
            );
        }

        return new FragmentSpread(
            $this->parseFragmentName(),
            $this->parseDirectives(),
            $this->location($start)
        );
    }
1065264
protected function getAppropriateMode() {
		$builder = $this->builder;
		$stack = $builder->stack;
		$last = false;
		$node = $stack->current;
		for ( $idx = $stack->length() - 1; $idx >= 0; $idx-- ) {
			$node = $stack->item( $idx );
			if ( $idx === 0 ) {
				$last = true;
				if ( $builder->isFragment ) {
					$node = $builder->fragmentContext;
				}
			}

			switch ( $node->htmlName ) {
			case 'select':
				if ( $last ) {
					return self::IN_SELECT;
				}
				for ( $ancestorIdx = $idx - 1; $ancestorIdx >= 1; $ancestorIdx-- ) {
					$ancestor = $stack->item( $ancestorIdx );
					if ( $ancestor->htmlName === 'template' ) {
						return self::IN_SELECT;
					} elseif ( $ancestor->htmlName === 'table' ) {
						return self::IN_SELECT_IN_TABLE;
					}
				}
				return self::IN_SELECT;

			case 'td':
			case 'th':
				if ( !$last ) {
					return self::IN_CELL;
				}
				break;

			case 'tr':
				return self::IN_ROW;

			case 'tbody':
			case 'thead':
			case 'tfoot':
				return self::IN_TABLE_BODY;

			case 'caption':
				return self::IN_CAPTION;

			case 'colgroup':
				return self::IN_COLUMN_GROUP;

			case 'table':
				return self::IN_TABLE;

			case 'template':
				return $this->templateModeStack->current;

			case 'head':
				if ( $last ) {
					return self::IN_BODY;
				} else {
					return self::IN_HEAD;
				}

			case 'body':
				return self::IN_BODY;

			case 'frameset':
				return self::IN_FRAMESET;

			case 'html':
				if ( $builder->headElement === null ) {
					return self::BEFORE_HEAD;
				} else {
					return self::AFTER_HEAD;
				}
			}
		}

		return self::IN_BODY;
	}
708547
private function parseFragments(PrecursorIon $precursor)
    {
        $line = trim($this->getLine());

        if (strlen($line) == 0) {
            return;
        }

        $pair = preg_split('/\\s/', $line, 3);

        $ion = new FragmentIon();
        $fragmentMz = (float) $pair[0];
        $fragmentCharge = 1;
        
        if (count($pair) > 1) {
            $ion->setIntensity((float) $pair[1]);
        }

        if (count($pair) > 2) {
            $fragmentCharge = (int) $pair[2];
        }

        $ion->setMonoisotopicMassCharge($fragmentMz, $fragmentCharge);

        $precursor->addFragmentIon($ion);
    }
1113234
protected function prepareParser()
    {
        return function (InlineParserInterface $stack, AbstractInlineParser $parser) {
            $parser->setNextParser($stack);
            $parser->setContext($this);

            return $parser;
        };
    }
625739
protected function getFragment(?string $fragment) : ?string
    {
        if ($fragment === null) {
            return null;
        }

        return '#' . $this->trim($fragment, '#');
    }
304222
public function getAbsoluteUri() {
        return $this->reconstitute(
            $this->scheme,
            $this->getAuthority(),
            $this->path,
            $this->query,
            $fragment = ''
        );
    }
900973
public function setPrevNext()
    {
        if ($this->prevEvent && $this->nextEvent) {
            return $this;
        }
        $entries = $this->entries();

        $isPrev = false;
        $isNext = false;
        $firstEvent = false;
        $lastEvent = false;

        foreach ($entries as $event) {
            // Obtain th first event.
            if (!$firstEvent) {
                $firstEvent = $event;
            }
            $lastEvent = $event;
            // Find the current event
            if ($event->id() == $this->currentEvent()['id']) {
                $isNext = true;
                $isPrev = true;

                continue;
            }
            if (!$isPrev) {
                $this->prevEvent = $event;
            }
            // Store the next event
            if ($isNext) {
                $this->nextEvent = $event;

                $isNext = false;
            }
        }

        if ($this->entryCycle()) {
            if (!$this->nextEvent) {
                $this->nextEvent = $firstEvent;
            }

            if (!$this->prevEvent) {
                $this->prevEvent = $lastEvent;
            }
        }

        return $this;
    }
992455
public function toBePresent()
    {
        $this->wait()->until(WebDriverExpectedCondition::presenceOfElementLocated($this->elementFinder->getSearchCriteria()));

        return $this;
    }
398393
public function getInheritedElement()
    {
        /** @var ClassDescriptor|InterfaceDescriptor|null $associatedClass */
        $associatedClass = $this->getParent();

        if (($associatedClass instanceof ClassDescriptor || $associatedClass instanceof InterfaceDescriptor)
            && ($associatedClass->getParent() instanceof ClassDescriptor
                || $associatedClass->getParent() instanceof InterfaceDescriptor
            )
        ) {
            /** @var ClassDescriptor|InterfaceDescriptor $parentClass */
            $parentClass = $associatedClass->getParent();

            return $parentClass->getProperties()->get($this->getName());
        }

        return null;
    }
5324
protected function getPluginNamespace()
    {
        if ($this->getArgumentNamespace() !== null) {
            return $this->getArgumentNamespace();
        }

        if ($this->node instanceof NodeInterface) {
            $nodeArgumentNamespace = $this->node->getProperty('argumentNamespace');
            if ($nodeArgumentNamespace !== null) {
                return $nodeArgumentNamespace;
            }

            $nodeArgumentNamespace = $this->node->getNodeType()->getName();
            $nodeArgumentNamespace = str_replace(':', '-', $nodeArgumentNamespace);
            $nodeArgumentNamespace = str_replace('.', '_', $nodeArgumentNamespace);
            $nodeArgumentNamespace = strtolower($nodeArgumentNamespace);
            return $nodeArgumentNamespace;
        }

        $argumentNamespace = str_replace([':', '.', '\\'], ['_', '_', '_'], ($this->getPackage() . '_' . $this->getSubpackage() . '-' . $this->getController()));
        $argumentNamespace = strtolower($argumentNamespace);

        return $argumentNamespace;
    }
1099718
public function previewVal()
    {
        $val = parent::inputVal();
        if (empty($val)) {
            return '';
        }

        $parts = parse_url($val);
        if (empty($parts['scheme']) && !in_array($val[0], [ '/', '#', '?' ])) {
            $path  = isset($parts['path']) ? ltrim($parts['path'], '/') : '';
            $query = isset($parts['query']) ? $parts['query'] : '';
            $hash  = isset($parts['fragment']) ? $parts['fragment'] : '';
            $val   = $this->baseUrl->withPath($path)->withQuery($query)->withFragment($hash);
        }

        return $val;
    }
1091058
protected function enterFragmentSpread(FragmentSpreadNode $node): VisitorResult
    {
        $fragmentName = $node->getNameValue();
        $fragmentType = $this->getFragmentType($fragmentName);
        $parentType   = $this->context->getParentType();

        if (null !== $fragmentType &&
            null !== $parentType &&
            !TypeHelper::doTypesOverlap($this->context->getSchema(), $fragmentType, $parentType)
        ) {
            $this->context->reportError(
                new ValidationException(
                    typeIncompatibleSpreadMessage($fragmentName, (string)$parentType, (string)$fragmentType),
                    [$node]
                )
            );
        }

        return new VisitorResult($node);
    }
461062
public function alias()
    {
        if ($this->alias === null) {
            $this->alias = strtolower(
                    preg_replace(
                    '/(?<!^)[A-Z]/', '_$0',
                    $this->getClassMetadata()->getReflectionClass()->getShortName()
                )
            );
        }

        return $this->alias;
    }
351454
public function getUrl()
    {
        $url = $this->getBaseUrl();

        if ($query = $this->getQueryString()) {
            if ($url) {
                if (!$this->path) {
                    $url .= '/';
                }
                $url .= '?';
            }

            $url .= $query;
        }

        if (isset($this->fragment)) {
            $url .= '#' . $this->fragment;
        }

        return $url;
    }
1107944
public function normalizePath()
    {
        if (!$this->path || $this->path == '/' || $this->path == '*') {
            return $this;
        }

        $results = array();
        $segments = $this->getPathSegments();
        foreach ($segments as $segment) {
            if ($segment == '..') {
                array_pop($results);
            } elseif ($segment != '.' && $segment != '') {
                $results[] = $segment;
            }
        }

        // Combine the normalized parts and add the leading slash if needed
        $this->path = ($this->path[0] == '/' ? '/' : '') . implode('/', $results);

        // Add the trailing slash if necessary
        if ($this->path != '/' && end($segments) == '') {
            $this->path .= '/';
        }

        return $this;
    }
340151
public function adjustedCurrentNode() {
		$current = $this->stack->current;
		if ( $this->isFragment && ( !$current || $current->stackIndex === 0 ) ) {
			return $this->fragmentContext;
		} else {
			return $current;
		}
	}
38167
public function getTermsOfUse()
    {
        if (false === $xml = simplexml_load_string($this->get_prefs())) {
            return null;
        }

        foreach ($xml->xpath('/baseprefs/cgu') as $sbpcgu) {
            return $sbpcgu->saveXML();
        }
    }