ASTVariableDeclaration extends AbstractEcmascriptNode<VariableDeclaration> { public boolean isLet() { return node.isLet(); } @Deprecated @InternalApi  ASTVariableDeclaration(VariableDeclaration variableDeclaration); @Override Object jjtAccept(EcmascriptParserVisitor visitor, Object data); ASTVariableInitializer getVariableInitializer(int index); boolean isVar(); boolean isLet(); boolean isConst();  }
@Test public void testLet() { ASTAstRoot node = js.parse("let x = 1;"); ASTVariableDeclaration varDecl = (ASTVariableDeclaration) node.getChild(0); Assert.assertTrue(varDecl.isLet()); ASTVariableInitializer varInit = (ASTVariableInitializer) varDecl.getChild(0); ASTName name = (ASTName) varInit.getChild(0); Assert.assertEquals("x", name.getImage()); }