- Added commentary for TOK_DEFSHARP nodes explaining pn_kid's purpose.
- Don't over-commend nearby #endifs at the expense of legibility. git-svn-id: svn://10.0.0.236/trunk@9750 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2420,11 +2420,11 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
*/
|
||||
oldflags = tc->flags;
|
||||
tc->flags &= ~TCF_IN_FOR_INIT;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
#endif
|
||||
pn2 = Expr(cx, ts, tc);
|
||||
#if JS_HAS_IN_OPERATOR
|
||||
tc->flags = oldflags;
|
||||
#endif /* JS_HAS_IN_OPERATOR */
|
||||
#endif
|
||||
if (!pn2)
|
||||
return NULL;
|
||||
|
||||
@@ -2438,7 +2438,7 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
case TOK_STRING:
|
||||
#if JS_HAS_SHARP_VARS
|
||||
notsharp = JS_TRUE;
|
||||
#endif /* JS_HAS_SHARP_VARS */
|
||||
#endif
|
||||
/* FALL THROUGH */
|
||||
case TOK_NAME:
|
||||
case TOK_OBJECT:
|
||||
@@ -2463,7 +2463,7 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
pn->pn_dval = ts->token.t_dval;
|
||||
#if JS_HAS_SHARP_VARS
|
||||
notsharp = JS_TRUE;
|
||||
#endif /* JS_HAS_SHARP_VARS */
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TOK_PRIMARY:
|
||||
@@ -2473,7 +2473,7 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
pn->pn_op = ts->token.t_op;
|
||||
#if JS_HAS_SHARP_VARS
|
||||
notsharp = JS_TRUE;
|
||||
#endif /* JS_HAS_SHARP_VARS */
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if !JS_HAS_EXPORT_IMPORT
|
||||
@@ -2508,7 +2508,7 @@ PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
defsharp->pn_kid = pn;
|
||||
return defsharp;
|
||||
}
|
||||
#endif /* JS_HAS_SHARP_VARS */
|
||||
#endif
|
||||
return pn;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,6 +125,9 @@ PR_BEGIN_EXTERN_C
|
||||
* each has pn_left: property id, pn_right: value
|
||||
* #n={...} produces TOK_DEFSHARP at head of list
|
||||
* TOK_DEFSHARP unary pn_num: jsint value of n in #n=
|
||||
* pn_kid: null for #n=[...] and #n={...}, primary
|
||||
* if #n=primary for function, paren, name, object
|
||||
* literal expressions
|
||||
* TOK_USESHARP nullary pn_num: jsint value of n in #n#
|
||||
* TOK_RP unary pn_kid: parenthesized expression
|
||||
* TOK_NAME, name pn_atom: name, string, or object atom
|
||||
|
||||
Reference in New Issue
Block a user