File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ module.exports = {
64
64
return this . next ( ) . read_const_list ( ) ;
65
65
case this . tok . T_NAMESPACE :
66
66
return this . read_namespace ( ) ;
67
+ case this . tok . T_HALT_COMPILER :
68
+ var result = this . node ( 'halt' ) ;
69
+ this . next ( ) . expect ( '(' ) . next ( ) . expect ( ')' ) . next ( ) . expect ( ';' ) ;
70
+ this . lexer . done = true ;
71
+ return result ( this . lexer . _input . substring (
72
+ this . lexer . offset
73
+ ) ) ;
67
74
default :
68
75
return this . read_statement ( ) ;
69
76
}
@@ -146,7 +153,9 @@ module.exports = {
146
153
return this . read_interface ( 0 ) ;
147
154
case this . tok . T_TRAIT :
148
155
return this . read_trait ( ) ;
149
- // @todo T_HALT_COMPILER '(' ')' ';'
156
+ case this . tok . T_HALT_COMPILER :
157
+ this . next ( ) . expect ( '(' ) . next ( ) . expect ( ')' ) . next ( ) . expect ( ';' ) . next ( ) ;
158
+ this . raiseError ( '__HALT_COMPILER() can only be used from the outermost scope' ) ;
150
159
default :
151
160
return this . read_statement ( ) ;
152
161
}
You can’t perform that action at this time.
0 commit comments