Changeset View
Changeset View
Standalone View
Standalone View
parser/php.g
Show First 20 Lines • Show All 1022 Lines • ▼ Show 20 Line(s) | 1022 | } else { | |||
---|---|---|---|---|---|
1023 | break; | 1023 | break; | ||
1024 | } | 1024 | } | ||
1025 | } :] | 1025 | } :] | ||
1026 | RBRACE [: rewind(tokenStream->index() - 2); :] | 1026 | RBRACE [: rewind(tokenStream->index() - 2); :] | ||
1027 | -> classBody ;; | 1027 | -> classBody ;; | ||
1028 | 1028 | | |||
1029 | VAR variable=classVariableDeclaration SEMICOLON | 1029 | VAR variable=classVariableDeclaration SEMICOLON | ||
1030 | | modifiers=optionalModifiers | 1030 | | modifiers=optionalModifiers | ||
1031 | ( variable=classVariableDeclaration SEMICOLON | 1031 | ( (propertyType=propertyType | 0) variable=classVariableDeclaration SEMICOLON | ||
1032 | | FUNCTION (BIT_AND | 0) methodName=semiReservedIdentifier LPAREN parameters=parameterList RPAREN | 1032 | | FUNCTION (BIT_AND | 0) methodName=semiReservedIdentifier LPAREN parameters=parameterList RPAREN | ||
1033 | ( COLON returnType=returnType | 0) | 1033 | ( COLON returnType=returnType | 0) | ||
1034 | methodBody=methodBody | 1034 | methodBody=methodBody | ||
1035 | | CONST #consts=classConstantDeclaration @ COMMA SEMICOLON | 1035 | | CONST #consts=classConstantDeclaration @ COMMA SEMICOLON | ||
1036 | ) | 1036 | ) | ||
1037 | | USE #traits=namespacedIdentifier @ COMMA (imports=traitAliasDeclaration|SEMICOLON) | 1037 | | USE #traits=namespacedIdentifier @ COMMA (imports=traitAliasDeclaration|SEMICOLON) | ||
1038 | -> classStatement ;; | 1038 | -> classStatement ;; | ||
1039 | 1039 | | |||
1040 | (isNullable=QUESTION | 0) typehint=propertyTypeHint | ||||
1041 | -> propertyType ;; | ||||
1042 | | ||||
1043 | ( genericType=namespacedIdentifier | ||||
1044 | | arrayType=ARRAY ) | ||||
1045 | [: (*yynode)->callableType = -1; :] | ||||
1046 | -> propertyTypeHint[ | ||||
1047 | member variable callableType: int; | ||||
1048 | ] ;; | ||||
1049 | | ||||
1040 | LBRACE #statements=traitAliasStatement | 1050 | LBRACE #statements=traitAliasStatement | ||
1041 | @ (SEMICOLON [: if (yytoken == Token_RBRACE) { break; } :]) RBRACE | 1051 | @ (SEMICOLON [: if (yytoken == Token_RBRACE) { break; } :]) RBRACE | ||
1042 | -> traitAliasDeclaration ;; | 1052 | -> traitAliasDeclaration ;; | ||
1043 | 1053 | | |||
1044 | importIdentifier=traitAliasIdentifier | 1054 | importIdentifier=traitAliasIdentifier | ||
1045 | -- first/first conflict resolved by LA(2) | 1055 | -- first/first conflict resolved by LA(2) | ||
1046 | -- We can either have a single token (modifier or identifier), or a combination | 1056 | -- We can either have a single token (modifier or identifier), or a combination | ||
1047 | ( AS (?[: LA(2).kind == Token_SEMICOLON :] | 1057 | ( AS (?[: LA(2).kind == Token_SEMICOLON :] | ||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |