7cff70bbcb
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
bindings/node | ||
corpus | ||
docs | ||
examples | ||
queries | ||
scripts | ||
src | ||
toml-spec | ||
tree-sitter@fc5a692b7d | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.npmignore | ||
.travis.yml | ||
binding.gyp | ||
CHANGELOG.md | ||
grammar.js | ||
LICENSE | ||
package.json | ||
README.md | ||
yarn.lock |
tree-sitter-toml
TOML (TOML Spec v1.0.0-rc.1) grammar for tree-sitter
Install
npm install tree-sitter-toml tree-sitter
Usage
const Parser = require("tree-sitter");
const TOML = require("tree-sitter-toml");
const parser = new Parser();
parser.setLanguage(TOML);
const sourceCode = `
[hello]
world = true
`;
const tree = parser.parse(sourceCode);
console.log(tree.rootNode.toString());
// (document
// (table
// (key)
// (pair
// (key) (boolean))))
License
MIT © Ika