nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Tree.java
changeset 39662 e2b36a3779b9
parent 35325 7624a7d7e661
child 41422 97eda72f53b6
equal deleted inserted replaced
39604:8e45018bde9d 39662:e2b36a3779b9
     1 /*
     1 /*
     2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    63          * Used for instances of {@link BreakTree}.
    63          * Used for instances of {@link BreakTree}.
    64          */
    64          */
    65         BREAK(BreakTree.class),
    65         BREAK(BreakTree.class),
    66 
    66 
    67         /**
    67         /**
       
    68          * Used for instances of {@link ClassDeclarationTree}.
       
    69          */
       
    70         CLASS(ClassDeclarationTree.class),
       
    71 
       
    72         /**
       
    73          * Used for instances of {@link ClassExpressionTree}.
       
    74          */
       
    75         CLASS_EXPRESSION(ClassExpressionTree.class),
       
    76 
       
    77         /**
    68          * Used for instances of {@link CaseTree}.
    78          * Used for instances of {@link CaseTree}.
    69          */
    79          */
    70         CASE(CaseTree.class),
    80         CASE(CaseTree.class),
    71 
    81 
    72         /**
    82         /**
   148          * Used for instances of {@link LabeledStatementTree}.
   158          * Used for instances of {@link LabeledStatementTree}.
   149          */
   159          */
   150         LABELED_STATEMENT(LabeledStatementTree.class),
   160         LABELED_STATEMENT(LabeledStatementTree.class),
   151 
   161 
   152         /**
   162         /**
       
   163          * Used for instances of {@link ModuleTree}.
       
   164          */
       
   165         MODULE(ModuleTree.class),
       
   166 
       
   167         /**
       
   168          * Used for instances of {@link ExportEntryTree}.
       
   169          */
       
   170         EXPORT_ENTRY(ExportEntryTree.class),
       
   171 
       
   172         /**
       
   173          * Used for instances of {@link ImportEntryTree}.
       
   174          */
       
   175         IMPORT_ENTRY(ImportEntryTree.class),
       
   176 
       
   177         /**
   153          * Used for instances of {@link FunctionDeclarationTree}.
   178          * Used for instances of {@link FunctionDeclarationTree}.
   154          */
   179          */
   155         FUNCTION(FunctionDeclarationTree.class),
   180         FUNCTION(FunctionDeclarationTree.class),
   156 
   181 
   157         /**
   182         /**
   181 
   206 
   182         /**
   207         /**
   183          * Used for instances of {@link RegExpLiteralTree}.
   208          * Used for instances of {@link RegExpLiteralTree}.
   184          */
   209          */
   185         REGEXP_LITERAL(RegExpLiteralTree.class),
   210         REGEXP_LITERAL(RegExpLiteralTree.class),
       
   211 
       
   212         /**
       
   213          * Used for instances of {@link TemplateLiteralTree}.
       
   214          */
       
   215         TEMPLATE_LITERAL(TemplateLiteralTree.class),
   186 
   216 
   187         /**
   217         /**
   188          * Used for instances of {@link ReturnTree}.
   218          * Used for instances of {@link ReturnTree}.
   189          */
   219          */
   190         RETURN(ReturnTree.class),
   220         RETURN(ReturnTree.class),
   284          */
   314          */
   285         TYPEOF(UnaryTree.class),
   315         TYPEOF(UnaryTree.class),
   286 
   316 
   287         /**
   317         /**
   288          * Used for instances of {@link UnaryTree} representing logical
   318          * Used for instances of {@link UnaryTree} representing logical
   289          * void operator {@code typeof}.
   319          * void operator {@code void}.
   290          */
   320          */
   291         VOID(UnaryTree.class),
   321         VOID(UnaryTree.class),
   292 
   322 
   293         /**
   323         /**
   294          * Used for instances of {@link BinaryTree} representing
   324          * Used for instances of {@link BinaryTree} representing
   491         /**
   521         /**
   492          * Used for instances of {@link CompoundAssignmentTree} representing
   522          * Used for instances of {@link CompoundAssignmentTree} representing
   493          * bitwise and logical "or" assignment {@code |=}.
   523          * bitwise and logical "or" assignment {@code |=}.
   494          */
   524          */
   495         OR_ASSIGNMENT(CompoundAssignmentTree.class),
   525         OR_ASSIGNMENT(CompoundAssignmentTree.class),
       
   526 
       
   527         /**
       
   528          * Used for instances of {@link SpreadTree} representing
       
   529          * spread "operator" for arrays and function call arguments.
       
   530          */
       
   531         SPREAD(SpreadTree.class),
       
   532 
       
   533         /**
       
   534          * Used for instances of {@link YieldTree} representing (generator)
       
   535          * yield expression {@code yield expr}.
       
   536          */
       
   537         YIELD(YieldTree.class),
   496 
   538 
   497         /**
   539         /**
   498          * Used for instances of {@link LiteralTree} representing
   540          * Used for instances of {@link LiteralTree} representing
   499          * a number literal expression of type {@code double}.
   541          * a number literal expression of type {@code double}.
   500          */
   542          */