File tree Expand file tree Collapse file tree 1 file changed +35
-35
lines changed Expand file tree Collapse file tree 1 file changed +35
-35
lines changed Original file line number Diff line number Diff line change @@ -236,41 +236,41 @@ public function doExpression( $expr ) {
236
236
}
237
237
$ op = $ this ->words [$ word ];
238
238
switch ( $ op ) {
239
- // constant
240
- case EXPR_EXPONENT :
241
- if ( $ expecting !== 'expression ' ) {
242
- continue ;
243
- }
244
- $ operands [] = exp ( 1 );
245
- $ expecting = 'operator ' ;
246
- continue 2 ;
247
- case EXPR_PI :
248
- if ( $ expecting !== 'expression ' ) {
249
- throw new ExprError ( 'unexpected_number ' );
250
- }
251
- $ operands [] = pi ();
252
- $ expecting = 'operator ' ;
253
- continue 2 ;
254
- // Unary operator
255
- case EXPR_NOT :
256
- case EXPR_SINE :
257
- case EXPR_COSINE :
258
- case EXPR_TANGENS :
259
- case EXPR_ARCSINE :
260
- case EXPR_ARCCOS :
261
- case EXPR_ARCTAN :
262
- case EXPR_EXP :
263
- case EXPR_LN :
264
- case EXPR_ABS :
265
- case EXPR_FLOOR :
266
- case EXPR_TRUNC :
267
- case EXPR_CEIL :
268
- case EXPR_SQRT :
269
- if ( $ expecting !== 'expression ' ) {
270
- throw new ExprError ( 'unexpected_operator ' , $ word );
271
- }
272
- $ operators [] = $ op ;
273
- continue 2 ;
239
+ // constant
240
+ case EXPR_EXPONENT :
241
+ if ( $ expecting !== 'expression ' ) {
242
+ break ;
243
+ }
244
+ $ operands [] = exp ( 1 );
245
+ $ expecting = 'operator ' ;
246
+ continue 2 ;
247
+ case EXPR_PI :
248
+ if ( $ expecting !== 'expression ' ) {
249
+ throw new ExprError ( 'unexpected_number ' );
250
+ }
251
+ $ operands [] = pi ();
252
+ $ expecting = 'operator ' ;
253
+ continue 2 ;
254
+ // Unary operator
255
+ case EXPR_NOT :
256
+ case EXPR_SINE :
257
+ case EXPR_COSINE :
258
+ case EXPR_TANGENS :
259
+ case EXPR_ARCSINE :
260
+ case EXPR_ARCCOS :
261
+ case EXPR_ARCTAN :
262
+ case EXPR_EXP :
263
+ case EXPR_LN :
264
+ case EXPR_ABS :
265
+ case EXPR_FLOOR :
266
+ case EXPR_TRUNC :
267
+ case EXPR_CEIL :
268
+ case EXPR_SQRT :
269
+ if ( $ expecting !== 'expression ' ) {
270
+ throw new ExprError ( 'unexpected_operator ' , $ word );
271
+ }
272
+ $ operators [] = $ op ;
273
+ continue 2 ;
274
274
}
275
275
// Binary operator, fall through
276
276
$ name = $ word ;
You can’t perform that action at this time.
0 commit comments