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 ArrayElementList = 102;
|
||||
const ListExpressionList = 103;
|
||||
const QualifiedNameList = 104;
|
||||
}
|
|
@ -38,6 +38,7 @@ use PhpParser\Node\DelimitedList\ArrayElementList;
|
|||
use PhpParser\Node\DelimitedList\ExpressionList;
|
||||
use PhpParser\Node\DelimitedList\ListExpressionList;
|
||||
use PhpParser\Node\DelimitedList\ParameterDeclarationList;
|
||||
use PhpParser\Node\DelimitedList\QualifiedNameList;
|
||||
use PhpParser\Node\DelimitedList\QualifiedNameParts;
|
||||
use PhpParser\Node\FunctionStaticDeclaration;
|
||||
use PhpParser\Node\GlobalDeclaration;
|
||||
|
@ -2414,7 +2415,9 @@ class Parser {
|
|||
TokenKind::CommaToken,
|
||||
$this->isQualifiedNameStartFn(),
|
||||
$this->parseQualifiedNameFn(),
|
||||
$parentNode);
|
||||
$parentNode,
|
||||
false,
|
||||
QualifiedNameList::class);
|
||||
}
|
||||
|
||||
private function parseInterfaceDeclaration($parentNode) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"textLength": 10
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"textLength": 10
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"textLength": 10
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"textLength": 10
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"textLength": 7
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"textLength": 7
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"textLength": 7
|
||||
},
|
||||
"interfaceNameList": {
|
||||
"DelimitedList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"QualifiedName": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче