src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java
changeset 48653 89111a0e6355
parent 47216 71c04702a3d5
equal deleted inserted replaced
48652:7c03f19d38a7 48653:89111a0e6355
   471      * @return true if traversal should continue and node children be traversed, false otherwise
   471      * @return true if traversal should continue and node children be traversed, false otherwise
   472      */
   472      */
   473     @Override
   473     @Override
   474     public boolean enterClassNode(final ClassNode classNode) {
   474     public boolean enterClassNode(final ClassNode classNode) {
   475         assert !classNode.isStatement(): "should not reach here for class declaration";
   475         assert !classNode.isStatement(): "should not reach here for class declaration";
   476 
   476         final IdentNode className = classNode.getIdent();
   477         curExpr = new ClassExpressionTreeImpl(classNode,
   477         curExpr = new ClassExpressionTreeImpl(classNode,
   478             translateIdent(classNode.getIdent()),
   478             className != null? translateIdent(className) : null,
   479             translateExpr(classNode.getClassHeritage()),
   479             translateExpr(classNode.getClassHeritage()),
   480             translateProperty(classNode.getConstructor()),
   480             translateProperty(classNode.getConstructor()),
   481             translateProperties(classNode.getClassElements()));
   481             translateProperties(classNode.getClassElements()));
   482 
   482 
   483         return false;
   483         return false;