How to use the tree-sitter-cli/node_modules/tree-sitter.Document function in tree-sitter-cli

To help you get started, we’ve selected a few tree-sitter-cli 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 tree-sitter / tree-sitter-javascript / script / benchmark.js View on Github external
profile('Tree-sitter', () => {
  document = new Document()
    .setInputString(code)
    .setLanguage(jsLanguage)
  document.parse()
  assert(document.rootNode.type === 'program')
})

tree-sitter-cli

CLI for generating fast incremental parsers

MIT
Latest version published 11 days ago

Package Health Score

92 / 100
Full package analysis

Popular tree-sitter-cli functions