@@ -782,7 +782,7 @@ function parse($TEXT, options) {
782782 else if ( ! optional && ! can_insert_semicolon ( ) ) expect ( ";" ) ;
783783 }
784784
785- function parenthesised ( ) {
785+ function parenthesized ( ) {
786786 expect ( "(" ) ;
787787 var exp = expression ( ) ;
788788 expect ( ")" ) ;
@@ -920,18 +920,18 @@ function parse($TEXT, options) {
920920 next ( ) ;
921921 var body = in_loop ( statement ) ;
922922 expect_token ( "keyword" , "while" ) ;
923- var condition = parenthesised ( ) ;
923+ var condition = parenthesized ( ) ;
924924 semicolon ( true ) ;
925925 return new AST_Do ( {
926926 body : body ,
927- condition : condition
927+ condition : condition ,
928928 } ) ;
929929
930930 case "while" :
931931 next ( ) ;
932932 return new AST_While ( {
933- condition : parenthesised ( ) ,
934- body : in_loop ( statement )
933+ condition : parenthesized ( ) ,
934+ body : in_loop ( statement ) ,
935935 } ) ;
936936
937937 case "for" :
@@ -959,15 +959,13 @@ function parse($TEXT, options) {
959959 value = expression ( ) ;
960960 semicolon ( ) ;
961961 }
962- return new AST_Return ( {
963- value : value
964- } ) ;
962+ return new AST_Return ( { value : value } ) ;
965963
966964 case "switch" :
967965 next ( ) ;
968966 return new AST_Switch ( {
969- expression : parenthesised ( ) ,
970- body : in_loop ( switch_body_ )
967+ expression : parenthesized ( ) ,
968+ body : in_loop ( switch_body_ ) ,
971969 } ) ;
972970
973971 case "throw" :
@@ -976,9 +974,7 @@ function parse($TEXT, options) {
976974 croak ( "Illegal newline after 'throw'" ) ;
977975 var value = expression ( ) ;
978976 semicolon ( ) ;
979- return new AST_Throw ( {
980- value : value
981- } ) ;
977+ return new AST_Throw ( { value : value } ) ;
982978
983979 case "try" :
984980 next ( ) ;
@@ -996,8 +992,8 @@ function parse($TEXT, options) {
996992 }
997993 next ( ) ;
998994 return new AST_With ( {
999- expression : parenthesised ( ) ,
1000- body : statement ( )
995+ expression : parenthesized ( ) ,
996+ body : statement ( ) ,
1001997 } ) ;
1002998 }
1003999 }
@@ -1421,15 +1417,15 @@ function parse($TEXT, options) {
14211417 } ;
14221418
14231419 function if_ ( ) {
1424- var cond = parenthesised ( ) , body = statement ( ) , belse = null ;
1420+ var cond = parenthesized ( ) , body = statement ( ) , alt = null ;
14251421 if ( is ( "keyword" , "else" ) ) {
14261422 next ( ) ;
1427- belse = statement ( ) ;
1423+ alt = statement ( ) ;
14281424 }
14291425 return new AST_If ( {
14301426 condition : cond ,
14311427 body : body ,
1432- alternative : belse
1428+ alternative : alt ,
14331429 } ) ;
14341430 }
14351431
@@ -2171,9 +2167,9 @@ function parse($TEXT, options) {
21712167 token_error ( sym . start , "Unexpected " + sym . name + " in strict mode" ) ;
21722168 }
21732169
2174- function as_symbol ( type , noerror ) {
2170+ function as_symbol ( type , no_error ) {
21752171 if ( ! is ( "name" ) ) {
2176- if ( ! noerror ) croak ( "Name expected" ) ;
2172+ if ( ! no_error ) croak ( "Name expected" ) ;
21772173 return null ;
21782174 }
21792175 var sym = _make_symbol ( type , S . token ) ;
@@ -2409,20 +2405,20 @@ function parse($TEXT, options) {
24092405 return new ctor ( { operator : op , expression : expr } ) ;
24102406 }
24112407
2412- var expr_op = function ( left , min_prec , no_in ) {
2408+ var expr_op = function ( left , min_precision , no_in ) {
24132409 var op = is ( "operator" ) ? S . token . value : null ;
24142410 if ( op == "in" && no_in ) op = null ;
2415- var prec = op != null ? PRECEDENCE [ op ] : null ;
2416- if ( prec != null && prec > min_prec ) {
2411+ var precision = op != null ? PRECEDENCE [ op ] : null ;
2412+ if ( precision != null && precision > min_precision ) {
24172413 next ( ) ;
2418- var right = expr_op ( maybe_unary ( no_in ) , op == "**" ? prec - 1 : prec , no_in ) ;
2414+ var right = expr_op ( maybe_unary ( no_in ) , op == "**" ? precision - 1 : precision , no_in ) ;
24192415 return expr_op ( new AST_Binary ( {
24202416 start : left . start ,
24212417 left : left ,
24222418 operator : op ,
24232419 right : right ,
2424- end : right . end
2425- } ) , min_prec , no_in ) ;
2420+ end : right . end ,
2421+ } ) , min_precision , no_in ) ;
24262422 }
24272423 return left ;
24282424 } ;
0 commit comments