code: function checkStatement(ast, start, end, fileText) {
          // Do not allow function or class nodes
          var notStatement = false;
          ASTWalker.simple(getAST(fileText.substr(start, end - start)), {
              FunctionDeclaration: function (node) {
                  notStatement = true;
              },
              ClassDeclaration: function (node) {
                  notStatement = true;
              }
          });
  
          if (notStatement) {
               return false;
          }
  
          var startStatement = findSurroundASTNode(ast, {start: start}, ["Statement"]);
          var endStatement   = findSurroundASTNode(ast, {start: end}, ["Statement"]);
  
          return startStatement && endStatement && startStatement.start === start &&
              startStatement.end <= end && endStatement.start >= start &&
              endStatement.end === end;
      }
docs: /*
  Checks whether the text between start and end offsets form a valid set of statements
  @param {!ASTNode} ast - the ast of the complete file
  @param {!number} start - the start offset
  @param {!number} end - the end offset
  @param {!string} fileText - the entire file text
  @return {boolean}