visitStmt()

in lib/common_generator.js [492:522]


  visitStmt(ast, isAsync, level) {
    let comments = DSL.comment.getFrontComments(this.ctx.comments, ast.tokenRange[0]);
    this.visitComments(comments, level);
    if (ast.type === 'return') {
      this.visitReturn(ast, isAsync, level);
    } else if (ast.type === 'if') {
      this.visitIf(ast, isAsync, level);
    } else if (ast.type === 'throw') {
      this.visitThrow(ast, level);
    } else if (ast.type === 'assign') {
      this.visitAssign(ast, level);
    } else if (ast.type === 'retry') {
      this.visitRetry(ast, level);
    } else if (ast.type === 'break') {
      this.emit(`break;\n`, level);
    } else if (ast.type === 'declare') {
      this.visitDeclare(ast, level);
    } else if (ast.type === 'while') {
      this.visitWhile(ast, isAsync, level);
    } else if (ast.type === 'for') {
      this.visitFor(ast, isAsync, level);
    } else if (ast.type === 'try') {
      this.visitTry(ast, isAsync, level);
    } else if (ast.type === 'yield') {
      this.visitYield(ast, level);
    } else {
      this.emit(``, level);
      this.visitExpr(ast, level);
      this.emit(';\n');
    }
  }