Go to file
2019-09-30 15:14:55 +08:00
corpus chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
docs chore(playground): update code sample 2019-09-01 02:11:29 +08:00
examples feat: initial implementation 2019-08-18 18:30:34 +08:00
scripts chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
src chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
.editorconfig fix: trailing whitespaces are allowed for local_time (#3) 2019-08-21 09:13:14 +08:00
.gitattributes chore: revert the previous commit and set *.wasm as binary 2019-09-01 01:16:46 +08:00
.gitignore chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
.npmignore feat: initial implementation 2019-08-18 18:30:34 +08:00
.travis.yml chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
binding.gyp feat: initial implementation 2019-08-18 18:30:34 +08:00
CHANGELOG.md docs(changelog): remove wrong link 2019-08-31 22:29:21 +08:00
grammar.js feat: unflatten structure and rename nodes (#4) 2019-08-31 22:16:56 +08:00
index.js feat: initial implementation 2019-08-18 18:30:34 +08:00
LICENSE feat: initial implementation 2019-08-18 18:30:34 +08:00
package.json chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
README.md docs(readme): update example output 2019-08-31 22:21:54 +08:00
yarn.lock chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00

tree-sitter-toml

npm build

TOML (TOML Spec v0.5.0) grammar for tree-sitter

Changelog

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