extract DelimitedList\QualifiedNameList
This commit is contained in:
Родитель
041f9ee703
Коммит
b1c2a5aee7
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
namespace PhpParser\Node\DelimitedList;
|
||||||
|
use PhpParser\Node\DelimitedList;
|
||||||
|
use PhpParser\NodeKind;
|
||||||
|
|
||||||
|
class QualifiedNameList extends DelimitedList {
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct(NodeKind::QualifiedNameList);
|
||||||
|
}
|
||||||
|
}
|
|
@ -111,4 +111,5 @@ class NodeKind {
|
||||||
const ExpressionList = 101;
|
const ExpressionList = 101;
|
||||||
const ArrayElementList = 102;
|
const ArrayElementList = 102;
|
||||||
const ListExpressionList = 103;
|
const ListExpressionList = 103;
|
||||||
|
const QualifiedNameList = 104;
|
||||||
}
|
}
|
|
@ -38,6 +38,7 @@ use PhpParser\Node\DelimitedList\ArrayElementList;
|
||||||
use PhpParser\Node\DelimitedList\ExpressionList;
|
use PhpParser\Node\DelimitedList\ExpressionList;
|
||||||
use PhpParser\Node\DelimitedList\ListExpressionList;
|
use PhpParser\Node\DelimitedList\ListExpressionList;
|
||||||
use PhpParser\Node\DelimitedList\ParameterDeclarationList;
|
use PhpParser\Node\DelimitedList\ParameterDeclarationList;
|
||||||
|
use PhpParser\Node\DelimitedList\QualifiedNameList;
|
||||||
use PhpParser\Node\DelimitedList\QualifiedNameParts;
|
use PhpParser\Node\DelimitedList\QualifiedNameParts;
|
||||||
use PhpParser\Node\FunctionStaticDeclaration;
|
use PhpParser\Node\FunctionStaticDeclaration;
|
||||||
use PhpParser\Node\GlobalDeclaration;
|
use PhpParser\Node\GlobalDeclaration;
|
||||||
|
@ -2414,7 +2415,9 @@ class Parser {
|
||||||
TokenKind::CommaToken,
|
TokenKind::CommaToken,
|
||||||
$this->isQualifiedNameStartFn(),
|
$this->isQualifiedNameStartFn(),
|
||||||
$this->parseQualifiedNameFn(),
|
$this->parseQualifiedNameFn(),
|
||||||
$parentNode);
|
$parentNode,
|
||||||
|
false,
|
||||||
|
QualifiedNameList::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parseInterfaceDeclaration($parentNode) {
|
private function parseInterfaceDeclaration($parentNode) {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"textLength": 10
|
"textLength": 10
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"textLength": 10
|
"textLength": 10
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"textLength": 10
|
"textLength": 10
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"textLength": 10
|
"textLength": 10
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"textLength": 7
|
"textLength": 7
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"textLength": 7
|
"textLength": 7
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"textLength": 7
|
"textLength": 7
|
||||||
},
|
},
|
||||||
"interfaceNameList": {
|
"interfaceNameList": {
|
||||||
"DelimitedList": {
|
"QualifiedNameList": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"QualifiedName": {
|
"QualifiedName": {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче