[refactoring] store expr parenthesis

This commit is contained in:
Vadym Slizov
2020-08-09 22:40:55 +02:00
parent b8b4439015
commit 394092269a
12 changed files with 2411 additions and 1290 deletions

View File

@@ -27,28 +27,19 @@ const (
Namespace
Static
Class
Use
While
For
Switch
Foreach
Declare
Label
Finally
List
Default
If
ElseIf
Else
Function
Alias
Equal
Exit
Array
Isset
Empty
Eval
Echo
Try
Catch
@@ -68,7 +59,6 @@ const (
AdaptationList
LexicalVarList
OpenParenthesisToken
CloseParenthesisToken
)

View File

@@ -30,52 +30,42 @@ func _() {
_ = x[Cond-19]
_ = x[Namespace-20]
_ = x[Static-21]
_ = x[Class-22]
_ = x[Use-23]
_ = x[While-24]
_ = x[For-25]
_ = x[Switch-26]
_ = x[Foreach-27]
_ = x[Declare-28]
_ = x[Label-29]
_ = x[Finally-30]
_ = x[List-31]
_ = x[Default-32]
_ = x[If-33]
_ = x[ElseIf-34]
_ = x[Else-35]
_ = x[Function-36]
_ = x[Alias-37]
_ = x[Equal-38]
_ = x[Exit-39]
_ = x[Array-40]
_ = x[Isset-41]
_ = x[Empty-42]
_ = x[Eval-43]
_ = x[Echo-44]
_ = x[Try-45]
_ = x[Catch-46]
_ = x[Unset-47]
_ = x[Stmts-48]
_ = x[VarList-49]
_ = x[ConstList-50]
_ = x[NameList-51]
_ = x[ParamList-52]
_ = x[ModifierList-53]
_ = x[ArrayPairList-54]
_ = x[CaseListStart-55]
_ = x[CaseListEnd-56]
_ = x[PropertyList-57]
_ = x[ParameterList-58]
_ = x[AdaptationList-59]
_ = x[LexicalVarList-60]
_ = x[OpenParenthesisToken-61]
_ = x[CloseParenthesisToken-62]
_ = x[Use-22]
_ = x[For-23]
_ = x[Foreach-24]
_ = x[Declare-25]
_ = x[Label-26]
_ = x[Finally-27]
_ = x[List-28]
_ = x[Default-29]
_ = x[Function-30]
_ = x[Alias-31]
_ = x[Equal-32]
_ = x[Array-33]
_ = x[Isset-34]
_ = x[Echo-35]
_ = x[Try-36]
_ = x[Catch-37]
_ = x[Unset-38]
_ = x[Stmts-39]
_ = x[VarList-40]
_ = x[ConstList-41]
_ = x[NameList-42]
_ = x[ParamList-43]
_ = x[ModifierList-44]
_ = x[ArrayPairList-45]
_ = x[CaseListStart-46]
_ = x[CaseListEnd-47]
_ = x[PropertyList-48]
_ = x[ParameterList-49]
_ = x[AdaptationList-50]
_ = x[LexicalVarList-51]
_ = x[CloseParenthesisToken-52]
}
const _Position_name = "StartEndSemiColonAltEndAmpersandNameKeyVarReturnTypeCaseSeparatorLexicalVarsParamsRefCastExprInitExprCondExprIncExprTrueCondNamespaceStaticClassUseWhileForSwitchForeachDeclareLabelFinallyListDefaultIfElseIfElseFunctionAliasEqualExitArrayIssetEmptyEvalEchoTryCatchUnsetStmtsVarListConstListNameListParamListModifierListArrayPairListCaseListStartCaseListEndPropertyListParameterListAdaptationListLexicalVarListOpenParenthesisTokenCloseParenthesisToken"
const _Position_name = "StartEndSemiColonAltEndAmpersandNameKeyVarReturnTypeCaseSeparatorLexicalVarsParamsRefCastExprInitExprCondExprIncExprTrueCondNamespaceStaticUseForForeachDeclareLabelFinallyListDefaultFunctionAliasEqualArrayIssetEchoTryCatchUnsetStmtsVarListConstListNameListParamListModifierListArrayPairListCaseListStartCaseListEndPropertyListParameterListAdaptationListLexicalVarListCloseParenthesisToken"
var _Position_index = [...]uint16{0, 5, 8, 17, 23, 32, 36, 39, 42, 52, 65, 76, 82, 85, 89, 93, 101, 109, 116, 120, 124, 133, 139, 144, 147, 152, 155, 161, 168, 175, 180, 187, 191, 198, 200, 206, 210, 218, 223, 228, 232, 237, 242, 247, 251, 255, 258, 263, 268, 273, 280, 289, 297, 306, 318, 331, 344, 355, 367, 380, 394, 408, 428, 449}
var _Position_index = [...]uint16{0, 5, 8, 17, 23, 32, 36, 39, 42, 52, 65, 76, 82, 85, 89, 93, 101, 109, 116, 120, 124, 133, 139, 142, 145, 152, 159, 164, 171, 175, 182, 190, 195, 200, 205, 210, 214, 217, 222, 227, 232, 239, 248, 256, 265, 277, 290, 303, 314, 326, 339, 353, 367, 388}
func (i Position) String() string {
if i < 0 || i >= Position(len(_Position_index)-1) {