Skip to content

Commit 3279b7e

Browse files
refactor: read_trait_declaration_statement
1 parent d928e86 commit 3279b7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/parser/class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ module.exports = {
346346
* trait ::= T_TRAIT T_STRING (T_EXTENDS (NAMESPACE_NAME ',')* NAMESPACE_NAME)? '{' FUNCTION* '}'
347347
* ```
348348
*/
349-
read_trait: function() {
349+
read_trait_declaration_statement: function() {
350350
const result = this.node("trait");
351351
// graceful mode : ignore token & go next
352352
if (this.token !== this.tok.T_TRAIT) {

src/parser/statement.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
case this.tok.T_INTERFACE:
4949
return this.read_interface_declaration_statement();
5050
case this.tok.T_TRAIT:
51-
return this.read_trait();
51+
return this.read_trait_declaration_statement();
5252
case this.tok.T_USE:
5353
return this.read_use_statement();
5454
case this.tok.T_CONST: {
@@ -161,7 +161,7 @@ module.exports = {
161161
case this.tok.T_INTERFACE:
162162
return this.read_interface_declaration_statement();
163163
case this.tok.T_TRAIT:
164-
return this.read_trait();
164+
return this.read_trait_declaration_statement();
165165
case this.tok.T_HALT_COMPILER: {
166166
this.raiseError(
167167
"__HALT_COMPILER() can only be used from the outermost scope"

0 commit comments

Comments
 (0)