[WIP] v1.0.0 proposal
Drop support for byRefToken in ArgumentExpression - it's a syntax error in php 7.0+ and is prohibited in php 5.4+. Convert the foo and otherFooList to fooList for union types in catch name lists, parameters, properties, and return union types. Remove ThrowStatement in favor of ThrowExpression for php 8.0. Remove EchoExpression in favor of EchoStatement - echo cannot be used as an expression. Remove statement from NamedLabelStatement - it's always null since a named label is a single statement by itself. TODO: Consistently support MissingToken in a single-element list in cases where a non-empty list is required, such as after `?` in types (php 8.0 union types forbid combining `?` with multiple types) TODO: Check for any regressions in diagnostics TODO: Validate that this can be used with real projects
This commit is contained in:
Родитель
35646d5501
Коммит
2a48939763
|
@ -7,6 +7,8 @@ an experiment and the start of a conversation.
|
|||
|
||||
![image](https://cloud.githubusercontent.com/assets/762848/19023070/4ab01c92-889a-11e6-9bb5-ec1a6816aba2.png)
|
||||
|
||||
This is the v1 branch, which changes data structures to support syntax added after the initial release for php 7.0.
|
||||
|
||||
## Get Started
|
||||
After you've [configured your machine](docs/GettingStarted.md), you can use the parser to generate and work
|
||||
with the Abstract Syntax Tree (AST) via a friendly API.
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
"description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios",
|
||||
"type": "library",
|
||||
"require": {
|
||||
"php": ">=7.0"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.4|^7.5.20"
|
||||
"phpunit/phpunit": "^7.5.20"
|
||||
},
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
namespace Microsoft\PhpParser\Node;
|
||||
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\Node\DelimitedList\QualifiedNameList;
|
||||
use Microsoft\PhpParser\MissingToken;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class CatchClause extends Node {
|
||||
|
@ -14,16 +16,8 @@ class CatchClause extends Node {
|
|||
public $catch;
|
||||
/** @var Token */
|
||||
public $openParen;
|
||||
/** @var QualifiedName */
|
||||
public $qualifiedName;
|
||||
/**
|
||||
* @var QualifiedName[]|Token[] Remaining tokens and qualified names in the catch clause
|
||||
* (e.g. `catch (FirstException|SecondException $x)` would contain
|
||||
* the representation of `|SecondException`)
|
||||
*
|
||||
* TODO: In the next backwards incompatible release, replace qualifiedName with qualifiedNameList?
|
||||
*/
|
||||
public $otherQualifiedNameList;
|
||||
/** @var QualifiedNameList[]|MissingToken */
|
||||
public $qualifiedNameList;
|
||||
/** @var Token|null */
|
||||
public $variableName;
|
||||
/** @var Token */
|
||||
|
@ -34,8 +28,7 @@ class CatchClause extends Node {
|
|||
const CHILD_NAMES = [
|
||||
'catch',
|
||||
'openParen',
|
||||
'qualifiedName',
|
||||
'otherQualifiedNameList',
|
||||
'qualifiedNameList',
|
||||
'variableName',
|
||||
'closeParen',
|
||||
'compoundStatement'
|
||||
|
|
|
@ -38,8 +38,7 @@ class AnonymousFunctionCreationExpression extends Expression implements Function
|
|||
// FunctionReturnType
|
||||
'colonToken',
|
||||
'questionToken',
|
||||
'returnType',
|
||||
'otherReturnTypes',
|
||||
'returnTypeList',
|
||||
|
||||
// FunctionBody
|
||||
'compoundStatementOrSemicolon'
|
||||
|
|
|
@ -10,15 +10,12 @@ use Microsoft\PhpParser\Node\Expression;
|
|||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class ArgumentExpression extends Expression {
|
||||
/** @var Token|null for php named arguments. If this is set, byRefToken and dotDotDotToken will not be set. */
|
||||
/** @var Token|null for php named arguments. If this is set, dotDotDotToken will not be set. */
|
||||
public $name;
|
||||
|
||||
/** @var Token|null */
|
||||
public $colonToken;
|
||||
|
||||
/** @var Token|null */
|
||||
public $byRefToken; // TODO removed in newer versions of PHP. Also only accept variable, not expression if byRef
|
||||
|
||||
/** @var Token|null */
|
||||
public $dotDotDotToken;
|
||||
|
||||
|
@ -28,7 +25,6 @@ class ArgumentExpression extends Expression {
|
|||
const CHILD_NAMES = [
|
||||
'name',
|
||||
'colonToken',
|
||||
'byRefToken',
|
||||
'dotDotDotToken',
|
||||
'expression'
|
||||
];
|
||||
|
|
|
@ -40,8 +40,7 @@ class ArrowFunctionCreationExpression extends Expression implements FunctionLike
|
|||
// FunctionReturnType
|
||||
'colonToken',
|
||||
'questionToken',
|
||||
'returnType',
|
||||
'otherReturnTypes',
|
||||
'returnTypeList',
|
||||
|
||||
// body
|
||||
'arrowToken',
|
||||
|
|
|
@ -11,10 +11,9 @@ use Microsoft\PhpParser\Token;
|
|||
trait FunctionReturnType {
|
||||
/** @var Token */
|
||||
public $colonToken;
|
||||
// TODO: This may be the wrong choice if ?type can ever be mixed with other types in union types
|
||||
/** @var Token|null */
|
||||
public $questionToken;
|
||||
/** @var Token|QualifiedName */
|
||||
public $returnType;
|
||||
/** @var DelimitedList\QualifiedNameList|null TODO: Merge with returnType in a future backwards incompatible release */
|
||||
public $otherReturnTypes;
|
||||
/** @var DelimitedList\QualifiedNameList|null */
|
||||
public $returnTypeList;
|
||||
}
|
||||
|
|
|
@ -34,8 +34,7 @@ class MethodDeclaration extends Node implements FunctionLike, ModifiedTypeInterf
|
|||
// FunctionReturnType
|
||||
'colonToken',
|
||||
'questionToken',
|
||||
'returnType',
|
||||
'otherReturnTypes',
|
||||
'returnTypeList',
|
||||
|
||||
// FunctionBody
|
||||
'compoundStatementOrSemicolon'
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace Microsoft\PhpParser\Node;
|
||||
|
||||
use Microsoft\PhpParser\MissingToken;
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
|
@ -16,13 +17,8 @@ class Parameter extends Node {
|
|||
public $visibilityToken;
|
||||
/** @var Token|null */
|
||||
public $questionToken;
|
||||
/** @var QualifiedName|Token|null */
|
||||
public $typeDeclaration;
|
||||
/**
|
||||
* @var DelimitedList\QualifiedNameList a list of other types, to support php 8 union types while remaining backwards compatible.
|
||||
* TODO: Merge with typeDeclaration in a future backwards incompatible release.
|
||||
*/
|
||||
public $otherTypeDeclarations;
|
||||
/** @var DelimitedList\QualifiedNameList|MissingToken|null */
|
||||
public $typeDeclarationList;
|
||||
/** @var Token|null */
|
||||
public $byRefToken;
|
||||
/** @var Token|null */
|
||||
|
@ -38,8 +34,7 @@ class Parameter extends Node {
|
|||
'attributes',
|
||||
'visibilityToken',
|
||||
'questionToken',
|
||||
'typeDeclaration',
|
||||
'otherTypeDeclarations',
|
||||
'typeDeclarationList',
|
||||
'byRefToken',
|
||||
'dotDotDotToken',
|
||||
'variableName',
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
|
||||
namespace Microsoft\PhpParser\Node;
|
||||
|
||||
use Microsoft\PhpParser\MissingToken;
|
||||
use Microsoft\PhpParser\ModifiedTypeInterface;
|
||||
use Microsoft\PhpParser\ModifiedTypeTrait;
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\Node\DelimitedList\QualifiedNameList;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class PropertyDeclaration extends Node implements ModifiedTypeInterface {
|
||||
|
@ -20,14 +22,8 @@ class PropertyDeclaration extends Node implements ModifiedTypeInterface {
|
|||
/** @var Token|null question token for PHP 7.4 type declaration */
|
||||
public $questionToken;
|
||||
|
||||
/** @var QualifiedName|Token|null */
|
||||
public $typeDeclaration;
|
||||
|
||||
/**
|
||||
* @var DelimitedList\QualifiedNameList|null
|
||||
* TODO: Unify with typeDeclaration in a future backwards incompatible release
|
||||
*/
|
||||
public $otherTypeDeclarations;
|
||||
/** @var QualifiedNameList|MissingToken|null */
|
||||
public $typeDeclarationList;
|
||||
|
||||
/** @var DelimitedList\ExpressionList */
|
||||
public $propertyElements;
|
||||
|
@ -39,8 +35,7 @@ class PropertyDeclaration extends Node implements ModifiedTypeInterface {
|
|||
'attributes',
|
||||
'modifiers',
|
||||
'questionToken',
|
||||
'typeDeclaration',
|
||||
'otherTypeDeclarations',
|
||||
'typeDeclarationList',
|
||||
'propertyElements',
|
||||
'semicolon'
|
||||
];
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace Microsoft\PhpParser\Node\Statement;
|
||||
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\MissingToken;
|
||||
use Microsoft\PhpParser\Node\DelimitedList;
|
||||
use Microsoft\PhpParser\Node\StatementNode;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
@ -16,10 +16,9 @@ class DeclareStatement extends StatementNode {
|
|||
public $declareKeyword;
|
||||
/** @var Token */
|
||||
public $openParen;
|
||||
/** @var Node */
|
||||
public $declareDirective;
|
||||
/** @var DelimitedList\DeclareDirectiveList|null TODO: Merge with $declareDirective in a future backwards incompatible release. */
|
||||
public $otherDeclareDirectives;
|
||||
// TODO Maybe create a delimited list with a missing token instead? Probably more consistent.
|
||||
/** @var DelimitedList\DeclareDirectiveList|MissingToken */
|
||||
public $declareDirectiveList;
|
||||
/** @var Token */
|
||||
public $closeParen;
|
||||
/** @var Token|null */
|
||||
|
@ -34,8 +33,7 @@ class DeclareStatement extends StatementNode {
|
|||
const CHILD_NAMES = [
|
||||
'declareKeyword',
|
||||
'openParen',
|
||||
'declareDirective',
|
||||
'otherDeclareDirectives',
|
||||
'declareDirectiveList',
|
||||
'closeParen',
|
||||
'colon',
|
||||
'statements',
|
||||
|
|
|
@ -4,20 +4,17 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
namespace Microsoft\PhpParser\Node\Expression;
|
||||
namespace Microsoft\PhpParser\Node\Statement;
|
||||
|
||||
use Microsoft\PhpParser\Node\Expression;
|
||||
use Microsoft\PhpParser\Node\StatementNode;
|
||||
use Microsoft\PhpParser\Node\DelimitedList\ExpressionList;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
/**
|
||||
* This represents either a literal echo expression (`echo expr`)
|
||||
* This represents either a literal echo statement (`echo expr`)
|
||||
* or a short echo tag (`<?= expr...`)
|
||||
*
|
||||
* TODO: An echo statement cannot be used as an expression.
|
||||
* Consider refactoring this to become EchoStatement in a future backwards incompatible release.
|
||||
*/
|
||||
class EchoExpression extends Expression {
|
||||
class EchoStatement extends StatementNode {
|
||||
|
||||
/**
|
||||
* @var Token|null this is null if generated from `<?=`
|
||||
|
@ -27,8 +24,12 @@ class EchoExpression extends Expression {
|
|||
/** @var ExpressionList */
|
||||
public $expressions;
|
||||
|
||||
/** @var Token */
|
||||
public $semicolon;
|
||||
|
||||
const CHILD_NAMES = [
|
||||
'echoKeyword',
|
||||
'expressions'
|
||||
'expressions',
|
||||
'semicolon',
|
||||
];
|
||||
}
|
|
@ -31,8 +31,7 @@ class FunctionDeclaration extends StatementNode implements NamespacedNameInterfa
|
|||
// FunctionReturnType
|
||||
'colonToken',
|
||||
'questionToken',
|
||||
'returnType',
|
||||
'otherReturnTypes',
|
||||
'returnTypeList',
|
||||
|
||||
// FunctionBody
|
||||
'compoundStatementOrSemicolon'
|
||||
|
|
|
@ -14,15 +14,9 @@ class NamedLabelStatement extends StatementNode {
|
|||
public $name;
|
||||
/** @var Token */
|
||||
public $colon;
|
||||
/**
|
||||
* @var null this is always null as of 0.0.23
|
||||
* TODO: Clean this up in the next major release.
|
||||
*/
|
||||
public $statement;
|
||||
|
||||
const CHILD_NAMES = [
|
||||
'name',
|
||||
'colon',
|
||||
'statement'
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
namespace Microsoft\PhpParser\Node\Statement;
|
||||
|
||||
use Microsoft\PhpParser\Node\Expression;
|
||||
use Microsoft\PhpParser\Node\StatementNode;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
// TODO: Remove this and replace with ThrowExpression in a backwards incompatible major release
|
||||
class ThrowStatement extends StatementNode {
|
||||
/** @var Token */
|
||||
public $throwKeyword;
|
||||
/** @var Expression */
|
||||
public $expression;
|
||||
/** @var Token */
|
||||
public $semicolon;
|
||||
|
||||
const CHILD_NAMES = [
|
||||
'throwKeyword',
|
||||
'expression',
|
||||
'semicolon'
|
||||
];
|
||||
}
|
|
@ -9,6 +9,7 @@ namespace Microsoft\PhpParser\Node;
|
|||
use Microsoft\PhpParser\ModifiedTypeInterface;
|
||||
use Microsoft\PhpParser\ModifiedTypeTrait;
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\Node\DelimitedList\QualifiedNameList;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class TraitSelectOrAliasClause extends Node implements ModifiedTypeInterface {
|
||||
|
@ -20,29 +21,15 @@ class TraitSelectOrAliasClause extends Node implements ModifiedTypeInterface {
|
|||
/** @var Token */
|
||||
public $asOrInsteadOfKeyword;
|
||||
|
||||
/** @var QualifiedName|Node\Expression\ScopedPropertyAccessExpression */
|
||||
public $targetName;
|
||||
|
||||
/**
|
||||
* @var Token[]|QualifiedName[]|null
|
||||
*
|
||||
* This is set if $asOrInsteadOfKeyword is an insteadof keyword.
|
||||
* (E.g. for parsing `use T1, T2, T3{T1::foo insteadof T2, T3}`
|
||||
*
|
||||
* NOTE: This was added as a separate property to minimize
|
||||
* backwards compatibility breaks in applications using this file.
|
||||
*
|
||||
* TODO: Use a more consistent design such as either of the following:
|
||||
* 1. Combine targetName and remainingTargetNames into a DelimitedList
|
||||
* 2. Use two distinct properties for the targets of `as` and `insteadof`
|
||||
* @var QualifiedNameList|QualifiedName depends on the keyword
|
||||
*/
|
||||
public $remainingTargetNames;
|
||||
public $targetNameList;
|
||||
|
||||
const CHILD_NAMES = [
|
||||
'name',
|
||||
'asOrInsteadOfKeyword',
|
||||
'modifiers',
|
||||
'targetName',
|
||||
'remainingTargetNames',
|
||||
'targetNameList',
|
||||
];
|
||||
}
|
||||
|
|
115
src/Parser.php
115
src/Parser.php
|
@ -40,7 +40,6 @@ use Microsoft\PhpParser\Node\Expression\{
|
|||
ParenthesizedExpression,
|
||||
PrefixUpdateExpression,
|
||||
PrintIntrinsicExpression,
|
||||
EchoExpression,
|
||||
ListIntrinsicExpression,
|
||||
ObjectCreationExpression,
|
||||
ScriptInclusionExpression,
|
||||
|
@ -89,6 +88,7 @@ use Microsoft\PhpParser\Node\Statement\{
|
|||
BreakOrContinueStatement,
|
||||
DeclareStatement,
|
||||
DoStatement,
|
||||
EchoStatement,
|
||||
EmptyStatement,
|
||||
EnumDeclaration,
|
||||
ExpressionStatement,
|
||||
|
@ -104,7 +104,6 @@ use Microsoft\PhpParser\Node\Statement\{
|
|||
NamedLabelStatement,
|
||||
ReturnStatement,
|
||||
SwitchStatementNode,
|
||||
ThrowStatement,
|
||||
TraitDeclaration,
|
||||
TryStatement,
|
||||
WhileStatement
|
||||
|
@ -830,13 +829,10 @@ class Parser {
|
|||
}
|
||||
$parameter->visibilityToken = $this->eatOptional([TokenKind::PublicKeyword, TokenKind::ProtectedKeyword, TokenKind::PrivateKeyword]);
|
||||
$parameter->questionToken = $this->eatOptional1(TokenKind::QuestionToken);
|
||||
$typeDeclarationList = $this->tryParseParameterTypeDeclarationList($parameter);
|
||||
if ($typeDeclarationList) {
|
||||
$parameter->typeDeclaration = array_shift($typeDeclarationList->children);
|
||||
$parameter->typeDeclaration->parent = $parameter;
|
||||
if ($typeDeclarationList->children) {
|
||||
$parameter->otherTypeDeclarations = $typeDeclarationList;
|
||||
}
|
||||
$parameter->typeDeclarationList = $this->tryParseParameterTypeDeclarationList($parameter);
|
||||
if ($parameter->questionToken && !$parameter->typeDeclarationList) {
|
||||
// TODO ParameterType?
|
||||
$parameter->typeDeclarationList = new MissingToken(TokenKind::PropertyType, $this->token->fullStart);
|
||||
}
|
||||
$parameter->byRefToken = $this->eatOptional1(TokenKind::AmpersandToken);
|
||||
// TODO add post-parse rule that prevents assignment
|
||||
|
@ -858,15 +854,10 @@ class Parser {
|
|||
private function parseAndSetReturnTypeDeclarationList($parentNode) {
|
||||
$returnTypeList = $this->parseReturnTypeDeclarationList($parentNode);
|
||||
if (!$returnTypeList) {
|
||||
$parentNode->returnType = new MissingToken(TokenKind::ReturnType, $this->token->fullStart);
|
||||
$parentNode->returnTypeList = new MissingToken(TokenKind::ReturnType, $this->token->fullStart);
|
||||
return;
|
||||
}
|
||||
$returnType = array_shift($returnTypeList->children);
|
||||
$parentNode->returnType = $returnType;
|
||||
$returnType->parent = $parentNode;
|
||||
if ($returnTypeList->children) {
|
||||
$parentNode->otherReturnTypes = $returnTypeList;
|
||||
}
|
||||
$parentNode->returnTypeList = $returnTypeList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2410,17 +2401,17 @@ class Parser {
|
|||
return $returnStatement;
|
||||
}
|
||||
|
||||
/** @return ExpressionStatement */
|
||||
private function parseThrowStatement($parentNode) {
|
||||
$throwStatement = new ThrowStatement();
|
||||
$throwStatement = new ExpressionStatement();
|
||||
$throwStatement->expression = $this->parseThrowExpression($throwStatement);
|
||||
$throwStatement->parent = $parentNode;
|
||||
$throwStatement->throwKeyword = $this->eat1(TokenKind::ThrowKeyword);
|
||||
// TODO error for failures to parse expressions when not optional
|
||||
$throwStatement->expression = $this->parseExpression($throwStatement);
|
||||
$throwStatement->semicolon = $this->eatSemicolonOrAbortStatement();
|
||||
|
||||
return $throwStatement;
|
||||
}
|
||||
|
||||
/** @return ThrowExpression */
|
||||
private function parseThrowExpression($parentNode) {
|
||||
$throwExpression = new ThrowExpression();
|
||||
$throwExpression->parent = $parentNode;
|
||||
|
@ -2454,9 +2445,7 @@ class Parser {
|
|||
$catchClause->parent = $parentNode;
|
||||
$catchClause->catch = $this->eat1(TokenKind::CatchKeyword);
|
||||
$catchClause->openParen = $this->eat1(TokenKind::OpenParenToken);
|
||||
$qualifiedNameList = $this->parseQualifiedNameCatchList($catchClause)->children ?? [];
|
||||
$catchClause->qualifiedName = $qualifiedNameList[0] ?? null; // TODO generate missing token or error if null
|
||||
$catchClause->otherQualifiedNameList = array_slice($qualifiedNameList, 1); // TODO: Generate error if the name list has missing tokens
|
||||
$catchClause->qualifiedNameList = $this->parseQualifiedNameCatchList($catchClause) ?? new MissingToken(TokenKind::QualifiedName, $this->token->fullStart); // TODO generate missing token or error if null
|
||||
$catchClause->variableName = $this->eatOptional1(TokenKind::VariableName);
|
||||
$catchClause->closeParen = $this->eat1(TokenKind::CloseParenToken);
|
||||
$catchClause->compoundStatement = $this->parseCompoundStatement($catchClause);
|
||||
|
@ -2501,27 +2490,7 @@ class Parser {
|
|||
private function parseAndSetDeclareDirectiveList($parentNode) {
|
||||
$declareDirectiveList = $this->parseDeclareDirectiveList($parentNode);
|
||||
|
||||
if (!$declareDirectiveList) {
|
||||
$declareDirective = new DeclareDirective();
|
||||
$declareDirective->parent = $parentNode;
|
||||
|
||||
$declareDirective->name = new MissingToken(TokenKind::Name, $this->token->fullStart);
|
||||
$declareDirective->equals = new MissingToken(TokenKind::EqualsToken, $this->token->fullStart);
|
||||
// TODO: This is matching the first token in $this::parseDeclareDirectiveFn.
|
||||
// Probably best to emit a more general "literal error".
|
||||
$declareDirective->literal = new MissingToken(TokenKind::FloatingLiteralToken, $this->token->fullStart);
|
||||
|
||||
$parentNode->declareDirective = $declareDirective;
|
||||
return;
|
||||
}
|
||||
|
||||
$declareDirective = array_shift($declareDirectiveList->children);
|
||||
$parentNode->declareDirective = $declareDirective;
|
||||
$declareDirective->parent = $parentNode;
|
||||
|
||||
if ($declareDirectiveList->children) {
|
||||
$parentNode->otherDeclareDirectives = $declareDirectiveList;
|
||||
}
|
||||
$parentNode->declareDirectiveList = $declareDirectiveList ?? new MissingToken(TokenKind::Name, $this->token->fullStart);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2645,27 +2614,22 @@ class Parser {
|
|||
return $scriptInclusionExpression;
|
||||
}
|
||||
|
||||
/** @return EchoStatement */
|
||||
private function parseEchoStatement($parentNode) {
|
||||
$expressionStatement = new ExpressionStatement();
|
||||
|
||||
// TODO: Could flatten into EchoStatement instead?
|
||||
$echoExpression = new EchoExpression();
|
||||
$echoExpression->parent = $expressionStatement;
|
||||
$echoExpression->echoKeyword = $this->eat1(TokenKind::EchoKeyword);
|
||||
$echoExpression->expressions =
|
||||
$this->parseExpressionList($echoExpression);
|
||||
|
||||
$expressionStatement->parent = $parentNode;
|
||||
$expressionStatement->expression = $echoExpression;
|
||||
$expressionStatement->semicolon = $this->eatSemicolonOrAbortStatement();
|
||||
|
||||
return $expressionStatement;
|
||||
$echoStatement = new EchoStatement();
|
||||
$echoStatement->parent = $parentNode;
|
||||
$echoStatement->echoKeyword = $this->eat1(TokenKind::EchoKeyword);
|
||||
$echoStatement->expressions =
|
||||
$this->parseExpressionList($echoStatement);
|
||||
$echoStatement->semicolon = $this->eatSemicolonOrAbortStatement();
|
||||
return $echoStatement;
|
||||
}
|
||||
|
||||
/** @return ExpressionStatement */
|
||||
private function parseUnsetStatement($parentNode) {
|
||||
$expressionStatement = new ExpressionStatement();
|
||||
|
||||
// TODO: Could flatten into UnsetStatement instead?
|
||||
// FIXME: flatten into UnsetStatement instead?
|
||||
$unsetExpression = $this->parseUnsetIntrinsicExpression($expressionStatement);
|
||||
|
||||
$expressionStatement->parent = $parentNode;
|
||||
|
@ -3003,7 +2967,6 @@ class Parser {
|
|||
$argumentExpression->name = $name;
|
||||
$argumentExpression->colonToken = $this->eat1(TokenKind::ColonToken);
|
||||
} else {
|
||||
$argumentExpression->byRefToken = $this->eatOptional1(TokenKind::AmpersandToken);
|
||||
$argumentExpression->dotDotDotToken = $this->eatOptional1(TokenKind::DotDotDotToken);
|
||||
}
|
||||
$argumentExpression->expression = $this->parseExpression($argumentExpression);
|
||||
|
@ -3261,18 +3224,9 @@ class Parser {
|
|||
$propertyDeclaration->modifiers = $modifiers;
|
||||
$propertyDeclaration->questionToken = $questionToken;
|
||||
if ($typeDeclarationList) {
|
||||
/** $typeDeclarationList is a Node or a Token (e.g. IntKeyword) */
|
||||
$typeDeclaration = \array_shift($typeDeclarationList->children);
|
||||
$propertyDeclaration->typeDeclaration = $typeDeclaration;
|
||||
if ($typeDeclaration instanceof Node) {
|
||||
$typeDeclaration->parent = $propertyDeclaration;
|
||||
}
|
||||
if ($typeDeclarationList->children) {
|
||||
$propertyDeclaration->otherTypeDeclarations = $typeDeclarationList;
|
||||
$typeDeclarationList->parent = $propertyDeclaration;
|
||||
}
|
||||
$propertyDeclaration->typeDeclarationList = $typeDeclarationList;
|
||||
} elseif ($questionToken) {
|
||||
$propertyDeclaration->typeDeclaration = new MissingToken(TokenKind::PropertyType, $this->token->fullStart);
|
||||
$propertyDeclaration->typeDeclarationList = new MissingToken(TokenKind::PropertyType, $this->token->fullStart);
|
||||
}
|
||||
$propertyDeclaration->propertyElements = $this->parseExpressionList($propertyDeclaration);
|
||||
$propertyDeclaration->semicolon = $this->eat1(TokenKind::SemicolonToken);
|
||||
|
@ -3713,15 +3667,10 @@ class Parser {
|
|||
$traitSelectAndAliasClause->modifiers = $this->parseModifiers(); // TODO accept all modifiers, verify later
|
||||
|
||||
if ($traitSelectAndAliasClause->asOrInsteadOfKeyword->kind === TokenKind::InsteadOfKeyword) {
|
||||
// https://github.com/Microsoft/tolerant-php-parser/issues/190
|
||||
// TODO: In the next backwards incompatible release, convert targetName to a list?
|
||||
$interfaceNameList = $this->parseQualifiedNameList($traitSelectAndAliasClause)->children ?? [];
|
||||
$traitSelectAndAliasClause->targetName = $interfaceNameList[0] ?? new MissingToken(TokenKind::BarToken, $this->token->fullStart);
|
||||
$traitSelectAndAliasClause->remainingTargetNames = array_slice($interfaceNameList, 1);
|
||||
$traitSelectAndAliasClause->targetNameList = $this->parseQualifiedNameList($traitSelectAndAliasClause);
|
||||
} else {
|
||||
$traitSelectAndAliasClause->targetName =
|
||||
$traitSelectAndAliasClause->targetNameList =
|
||||
$this->parseQualifiedNameOrScopedPropertyAccessExpression($traitSelectAndAliasClause);
|
||||
$traitSelectAndAliasClause->remainingTargetNames = [];
|
||||
}
|
||||
|
||||
// TODO errors for insteadof/as
|
||||
|
@ -4033,14 +3982,10 @@ class Parser {
|
|||
|
||||
// This is the easiest way to represent `<?= "expr", "other" `
|
||||
if (($inlineHtml->scriptSectionStartTag->kind ?? null) === TokenKind::ScriptSectionStartWithEchoTag) {
|
||||
$echoStatement = new ExpressionStatement();
|
||||
$echoStatement = new EchoStatement();
|
||||
$expressionList = $this->parseExpressionList($echoStatement) ?? (new MissingToken(TokenKind::Expression, $this->token->fullStart));
|
||||
$echoStatement->expressions = $expressionList;
|
||||
|
||||
$echoExpression = new EchoExpression();
|
||||
$expressionList = $this->parseExpressionList($echoExpression) ?? (new MissingToken(TokenKind::Expression, $this->token->fullStart));
|
||||
$echoExpression->expressions = $expressionList;
|
||||
$echoExpression->parent = $echoStatement;
|
||||
|
||||
$echoStatement->expression = $echoExpression;
|
||||
$echoStatement->semicolon = $this->eatSemicolonOrAbortStatement();
|
||||
$echoStatement->parent = $inlineHtml;
|
||||
// Deliberately leave echoKeyword as null instead of MissingToken
|
||||
|
|
|
@ -9,28 +9,13 @@ use PHPUnit\Framework\TestListener;
|
|||
use PHPUnit\Framework\TestListenerDefaultImplementation;
|
||||
use PHPUnit\Framework\AssertionFailedError;
|
||||
|
||||
if (PHP_VERSION_ID >= 70100) {
|
||||
// PHPUnit 7 requires a return type of void, which is impossible in php 7.0
|
||||
class CallbackTestListener implements TestListener {
|
||||
private $cb;
|
||||
public function __construct(Closure $cb) {
|
||||
$this->cb = $cb;
|
||||
}
|
||||
use TestListenerDefaultImplementation;
|
||||
// php 7.1 does not support param type widening.
|
||||
function addFailure(Test $test, AssertionFailedError $e, float $time): void {
|
||||
($this->cb)($test);
|
||||
}
|
||||
class CallbackTestListener implements TestListener {
|
||||
private $cb;
|
||||
public function __construct(Closure $cb) {
|
||||
$this->cb = $cb;
|
||||
}
|
||||
} else {
|
||||
class CallbackTestListener implements TestListener {
|
||||
private $cb;
|
||||
public function __construct(Closure $cb) {
|
||||
$this->cb = $cb;
|
||||
}
|
||||
use TestListenerDefaultImplementation;
|
||||
function addFailure(Test $test, AssertionFailedError $e, $time) {
|
||||
($this->cb)($test);
|
||||
}
|
||||
use TestListenerDefaultImplementation;
|
||||
function addFailure(Test $test, AssertionFailedError $e, float $time): void {
|
||||
($this->cb)($test);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class LexicalGrammarTest extends TestCase {
|
|||
public function run(TestResult $result = null) : TestResult {
|
||||
if (!isset($GLOBALS["GIT_CHECKOUT_LEXER"])) {
|
||||
$GLOBALS["GIT_CHECKOUT_LEXER"] = true;
|
||||
exec("git -C " . dirname(self::FILE_PATTERN) . " checkout *.php.tokens");
|
||||
// exec("git -C " . dirname(self::FILE_PATTERN) . " checkout *.php.tokens");
|
||||
}
|
||||
|
||||
$result->addListener(new CallbackTestListener(function (Test $test) {
|
||||
|
@ -39,7 +39,7 @@ class LexicalGrammarTest extends TestCase {
|
|||
$fileContents = file_get_contents($testCaseFile);
|
||||
if (!file_exists($expectedTokensFile)) {
|
||||
file_put_contents($expectedTokensFile, $fileContents);
|
||||
exec("git add " . $expectedTokensFile);
|
||||
// exec("git add " . $expectedTokensFile);
|
||||
}
|
||||
|
||||
$expectedTokens = str_replace("\r\n", "\n", file_get_contents($expectedTokensFile));
|
||||
|
|
|
@ -18,7 +18,7 @@ class ParserGrammarTest extends TestCase {
|
|||
public function run(TestResult $result = null) : TestResult {
|
||||
if (!isset($GLOBALS["GIT_CHECKOUT_PARSER"])) {
|
||||
$GLOBALS["GIT_CHECKOUT_PARSER"] = true;
|
||||
exec("git -C " . dirname(self::FILE_PATTERN) . " checkout *.php.tree *.php.diag");
|
||||
// exec("git -C " . dirname(self::FILE_PATTERN) . " checkout *.php.tree *.php.diag");
|
||||
}
|
||||
|
||||
$result->addListener(new CallbackTestListener(function (Test $test) {
|
||||
|
@ -44,12 +44,12 @@ class ParserGrammarTest extends TestCase {
|
|||
$fileContents = file_get_contents($testCaseFile);
|
||||
if (!file_exists($expectedTokensFile)) {
|
||||
file_put_contents($expectedTokensFile, $fileContents);
|
||||
exec("git add " . $expectedTokensFile);
|
||||
// exec("git add " . $expectedTokensFile);
|
||||
}
|
||||
|
||||
if (!file_exists($expectedDiagnosticsFile)) {
|
||||
file_put_contents($expectedDiagnosticsFile, $fileContents);
|
||||
exec("git add " . $expectedDiagnosticsFile);
|
||||
// exec("git add " . $expectedDiagnosticsFile);
|
||||
}
|
||||
|
||||
$parser = new \Microsoft\PhpParser\Parser();
|
||||
|
|
|
@ -52,26 +52,22 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": null,
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 3
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
]
|
||||
"EchoStatement": {
|
||||
"echoKeyword": null,
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 3
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": null
|
||||
|
|
|
@ -68,8 +68,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -65,8 +65,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -68,8 +68,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -67,11 +67,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "BoolReservedWord",
|
||||
"textLength": 4
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "BoolReservedWord",
|
||||
"textLength": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -72,11 +72,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "BoolReservedWord",
|
||||
"textLength": 4
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "BoolReservedWord",
|
||||
"textLength": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -64,8 +64,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -41,8 +41,7 @@
|
|||
"anonymousFunctionUseClause": null,
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
@ -51,29 +50,25 @@
|
|||
},
|
||||
"statements": [
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 7
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
]
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 7
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -84,11 +84,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "VoidReservedWord",
|
||||
"textLength": 4
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "VoidReservedWord",
|
||||
"textLength": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -38,8 +38,7 @@
|
|||
"anonymousFunctionUseClause": null,
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"anonymousFunctionUseClause": null,
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -42,8 +42,7 @@
|
|||
"anonymousFunctionUseClause": null,
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
"anonymousFunctionUseClause": null,
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
"anonymousFunctionUseClause": null,
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -94,8 +94,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"UnaryOpExpression": {
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"ReservedWord": {
|
||||
|
@ -58,7 +57,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"ReservedWord": {
|
||||
|
@ -78,7 +76,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"ReservedWord": {
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"MemberAccessExpression": {
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"NumericLiteral": {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
// This is a syntax error in php 7.0+.
|
||||
// Using a call-time pass-by-reference was deprecated in php 5.3 and prohibited since 5.4.
|
||||
foo(&$a);
|
|
@ -0,0 +1,20 @@
|
|||
[
|
||||
{
|
||||
"kind": 0,
|
||||
"message": "')' expected.",
|
||||
"start": 140,
|
||||
"length": 0
|
||||
},
|
||||
{
|
||||
"kind": 0,
|
||||
"message": "';' expected.",
|
||||
"start": 143,
|
||||
"length": 0
|
||||
},
|
||||
{
|
||||
"kind": 0,
|
||||
"message": "Unexpected ')'",
|
||||
"start": 143,
|
||||
"length": 1
|
||||
}
|
||||
]
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
"SourceFileNode": {
|
||||
"statementList": [
|
||||
{
|
||||
"InlineHtml": {
|
||||
"scriptSectionEndTag": null,
|
||||
"text": null,
|
||||
"scriptSectionStartTag": {
|
||||
"kind": "ScriptSectionStartTag",
|
||||
"textLength": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"BinaryExpression": {
|
||||
"leftOperand": {
|
||||
"CallExpression": {
|
||||
"callableExpression": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"openParen": {
|
||||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"argumentExpressionList": null,
|
||||
"closeParen": {
|
||||
"error": "MissingToken",
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"operator": {
|
||||
"kind": "AmpersandToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"rightOperand": {
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
"error": "MissingToken",
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"error": "SkippedToken",
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"EmptyStatement": {
|
||||
"semicolon": {
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"endOfFileToken": {
|
||||
"kind": "EndOfFileToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,7 +35,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"AssignmentExpression": {
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"AssignmentExpression": {
|
||||
|
@ -73,7 +72,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"AssignmentExpression": {
|
||||
|
@ -73,7 +72,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"AssignmentExpression": {
|
||||
|
@ -73,7 +72,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": {
|
||||
"kind": "DotDotDotToken",
|
||||
"textLength": 3
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"NumericLiteral": {
|
||||
|
|
|
@ -110,43 +110,39 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"ScopedPropertyAccessExpression": {
|
||||
"scopeResolutionQualifier": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 1
|
||||
}
|
||||
]
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"ScopedPropertyAccessExpression": {
|
||||
"scopeResolutionQualifier": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 1
|
||||
}
|
||||
},
|
||||
"doubleColon": {
|
||||
"kind": "ColonColonToken",
|
||||
"textLength": 2
|
||||
},
|
||||
"memberName": {
|
||||
"kind": "Name",
|
||||
"textLength": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"doubleColon": {
|
||||
"kind": "ColonColonToken",
|
||||
"textLength": 2
|
||||
},
|
||||
"memberName": {
|
||||
"kind": "Name",
|
||||
"textLength": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -65,8 +65,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -62,8 +62,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -83,8 +82,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -104,8 +102,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -62,8 +62,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -83,8 +82,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -107,11 +105,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -61,8 +61,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
@ -108,8 +107,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -116,7 +116,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -118,7 +118,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -134,7 +134,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
@ -155,7 +154,6 @@
|
|||
"ArgumentExpression": {
|
||||
"name": null,
|
||||
"colonToken": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"expression": {
|
||||
"Variable": {
|
||||
|
|
|
@ -64,8 +64,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 3
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 3
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -4,17 +4,5 @@
|
|||
"message": "'Name' expected.",
|
||||
"start": 16,
|
||||
"length": 0
|
||||
},
|
||||
{
|
||||
"kind": 0,
|
||||
"message": "'=' expected.",
|
||||
"start": 16,
|
||||
"length": 0
|
||||
},
|
||||
{
|
||||
"kind": 0,
|
||||
"message": "'FloatingLiteralToken' expected.",
|
||||
"start": 16,
|
||||
"length": 0
|
||||
}
|
||||
]
|
|
@ -21,26 +21,11 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"error": "MissingToken",
|
||||
"kind": "Name",
|
||||
"textLength": 0
|
||||
},
|
||||
"equals": {
|
||||
"error": "MissingToken",
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 0
|
||||
},
|
||||
"literal": {
|
||||
"error": "MissingToken",
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"error": "MissingToken",
|
||||
"kind": "Name",
|
||||
"textLength": 0
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,25 +21,25 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 12
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": {
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 12
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,25 +21,25 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 12
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": {
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 12
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 14
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 14
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 2
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 2
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,24 +21,29 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"error": "MissingToken",
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 0
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"error": "MissingToken",
|
||||
"kind": "FloatingLiteralToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,23 +21,28 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 2
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"literal": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -21,24 +21,29 @@
|
|||
"kind": "OpenParenToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"declareDirective": {
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"error": "MissingToken",
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 0
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 3
|
||||
}
|
||||
"declareDirectiveList": {
|
||||
"DeclareDirectiveList": {
|
||||
"children": [
|
||||
{
|
||||
"DeclareDirective": {
|
||||
"name": {
|
||||
"kind": "Name",
|
||||
"textLength": 5
|
||||
},
|
||||
"equals": {
|
||||
"error": "MissingToken",
|
||||
"kind": "EqualsToken",
|
||||
"textLength": 0
|
||||
},
|
||||
"literal": {
|
||||
"kind": "IntegerLiteralToken",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherDeclareDirectives": null,
|
||||
"closeParen": {
|
||||
"kind": "CloseParenToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -12,42 +12,38 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 7
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 7
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
"endQuote": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,28 +12,24 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,16 +12,12 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": null
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": null,
|
||||
"semicolon": {
|
||||
"kind": "SemicolonToken",
|
||||
"textLength": 1
|
||||
|
|
|
@ -12,28 +12,24 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,55 +12,51 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 2
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 2
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,59 +12,55 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": {
|
||||
"kind": "DoubleQuoteToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"children": [],
|
||||
"endQuote": {
|
||||
"error": "MissingToken",
|
||||
"kind": "DoubleQuoteToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": {
|
||||
"kind": "DoubleQuoteToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"children": [],
|
||||
"endQuote": {
|
||||
"error": "MissingToken",
|
||||
"kind": "DoubleQuoteToken",
|
||||
"textLength": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,28 +12,24 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
}
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,29 +12,25 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 4
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
]
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"StringLiteral": {
|
||||
"startQuote": null,
|
||||
"children": {
|
||||
"kind": "StringLiteralToken",
|
||||
"textLength": 4
|
||||
},
|
||||
"endQuote": null
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -12,45 +12,41 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"ExpressionStatement": {
|
||||
"expression": {
|
||||
"EchoExpression": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
"EchoStatement": {
|
||||
"echoKeyword": {
|
||||
"kind": "EchoKeyword",
|
||||
"textLength": 4
|
||||
},
|
||||
"expressions": {
|
||||
"ExpressionList": {
|
||||
"children": [
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"dollar": null,
|
||||
"name": {
|
||||
"kind": "VariableName",
|
||||
"textLength": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "CommaToken",
|
||||
"textLength": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"semicolon": {
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,8 +55,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": {
|
||||
"kind": "AmpersandToken",
|
||||
"textLength": 1
|
||||
|
@ -83,8 +81,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,19 +55,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": {
|
||||
"kind": "AmpersandToken",
|
||||
"textLength": 1
|
||||
|
@ -94,8 +98,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,19 +55,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": {
|
||||
"kind": "DotDotDotToken",
|
||||
|
@ -91,8 +95,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,19 +55,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": {
|
||||
"kind": "DotDotDotToken",
|
||||
|
@ -95,8 +99,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,19 +55,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": {
|
||||
"kind": "DotDotDotToken",
|
||||
|
@ -91,8 +95,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -112,8 +115,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,19 +55,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": {
|
||||
"kind": "DotDotDotToken",
|
||||
|
@ -91,8 +95,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": {
|
||||
"kind": "DotDotDotToken",
|
||||
|
@ -115,8 +118,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": null,
|
||||
"otherTypeDeclarations": null,
|
||||
"typeDeclarationList": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -56,8 +55,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -38,19 +38,24 @@
|
|||
"kind": "QuestionToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 7
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -73,11 +78,16 @@
|
|||
"kind": "QuestionToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"typeDeclaration": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -100,11 +110,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,19 +35,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 7
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -67,11 +72,16 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -97,11 +107,16 @@
|
|||
"kind": "QuestionToken",
|
||||
"textLength": 1
|
||||
},
|
||||
"returnType": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -37,11 +37,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -35,19 +35,24 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 7
|
||||
"QualifiedName": {
|
||||
"globalSpecifier": null,
|
||||
"relativeSpecifier": null,
|
||||
"nameParts": [
|
||||
{
|
||||
"kind": "Name",
|
||||
"textLength": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -67,11 +72,16 @@
|
|||
"attributes": null,
|
||||
"visibilityToken": null,
|
||||
"questionToken": null,
|
||||
"typeDeclaration": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"typeDeclarationList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherTypeDeclarations": null,
|
||||
"byRefToken": null,
|
||||
"dotDotDotToken": null,
|
||||
"variableName": {
|
||||
|
@ -94,11 +104,16 @@
|
|||
"textLength": 1
|
||||
},
|
||||
"questionToken": null,
|
||||
"returnType": {
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
"returnTypeList": {
|
||||
"QualifiedNameList": {
|
||||
"children": [
|
||||
{
|
||||
"kind": "IntReservedWord",
|
||||
"textLength": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"otherReturnTypes": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
},
|
||||
"colonToken": null,
|
||||
"questionToken": null,
|
||||
"returnType": null,
|
||||
"otherReturnTypes": null,
|
||||
"returnTypeList": null,
|
||||
"compoundStatementOrSemicolon": {
|
||||
"CompoundStatementNode": {
|
||||
"openBrace": {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче