Automattic\WooCommerce\Vendor\GraphQL\Language
Parser::loc
Returns a location object, used to identify the place in the source that created a given parsed object.
Method of the class: Parser{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->loc( $startToken ): ?Location;
- $startToken(Token) (required)
- .
Parser::loc() Parser::loc code WC 11.1.2
private function loc(Token $startToken): ?Location
{
if (! ($this->lexer->options['noLocation'] ?? false)) {
return new Location($startToken, $this->lexer->lastToken, $this->lexer->source);
}
return null;
}