private static void checkAssignment ( NodeTraversal t , Node n ) { if ( n . getFirstChild ( ) . isName ( ) ) { if ( "arguments" . equals ( n . getFirstChild ( ) . getString ( ) ) ) { t . report ( n , ARGUMENTS_ASSIGNMENT ) ; } else if ( "eval" . equals ( n . getFirstChild ( ) . getString ( ) ) ) { // Note that assignment to eval is already illegal because any use of // that name is illegal. t . report ( n , EVAL_ASSIGNMENT ) ; } } }
Checks that an assignment is not to the arguments object .