How to use the acorn.Node function in acorn

To help you get started, we’ve selected a few acorn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wrleskovec / react-week-scheduler / node_modules / acorn / src / loose / state.js View on Github external
startNodeAt(pos) {
    if (this.options.locations) {
      return new Node(this.toks, pos[0], pos[1])
    } else {
      return new Node(this.toks, pos)
    }
  }
github wrleskovec / react-week-scheduler / node_modules / acorn / src / loose / state.js View on Github external
startNode() {
    return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
  }
github emscripten-core / emscripten / tools / acorn-optimizer.js View on Github external
function createNode(props) {
  var node = new acorn.Node(stubParser);
  Object.assign(node, props);
  return node;
}
github wrleskovec / react-week-scheduler / node_modules / acorn / src / loose / state.js View on Github external
startNodeAt(pos) {
    if (this.options.locations) {
      return new Node(this.toks, pos[0], pos[1])
    } else {
      return new Node(this.toks, pos)
    }
  }