Go to file
2020-06-29 00:15:32 +08:00
corpus feat: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +08:00
docs chore: upgrade to tree-sitter-playground@0.15.9 2019-09-30 15:19:47 +08:00
examples feat: initial implementation 2019-08-18 18:30:34 +08:00
scripts chore(deps): upgrade to tree-sitter@0.16.7 2020-06-02 22:37:59 +08:00
src feat: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +08:00
toml-spec feat: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +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: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +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: add postbump script 2020-06-29 00:15:32 +08:00
README.md feat: upgrade to TOML spec v1.0.0-rc.1 (#11) 2020-06-29 00:08:52 +08:00
yarn.lock chore(dev-deps): bump handlebars from 4.1.2 to 4.5.3 (#5) 2020-02-20 16:19:52 +08:00

tree-sitter-toml

npm build

TOML (TOML Spec v1.0.0-rc.1) 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