code: function makeSimpleExpr(expr) {
      var a, b, c;
      if (expr.charAt(0) === '$') {
          return new VariableExpr(expr.substr(1));
      } else if (expr.charAt(0) === '@') {
          a = new NodeTestName(expr.substr(1));
          b = new StepExpr('attribute', a);
          c = new LocationExpr();
          c.appendStep(b);
          return c;
      } else if (expr.match(/^[0-9]+$/)) {
          return new NumberExpr(expr);
      } else {
          a = new NodeTestName(expr);
          b = new StepExpr('child', a);
          c = new LocationExpr();
          c.appendStep(b);
          return c;
      }
  }
docs: Used before parsing for optimization of common simple cases. See the begin of xpathParse() for which they are.