Commit graph

33 commits

Author SHA1 Message Date
Ika 7df9880bf8
feat: upgrade to TOML spec v1.0.0-rc.1 (#11)
* chore: add toml-spec
* feat: upgrade to TOML spec v1.0.0-rc.1
* fix: accurate position for multiline string end
2020-06-29 00:08:52 +08:00
Ika 470dc1e3bc
chore: suppress warnings for intended behavior (#8) 2020-06-07 16:46:47 +08:00
Ika ea45e670ee chore(deps): upgrade to tree-sitter@0.16.7 2020-06-02 22:37:59 +08:00
dependabot[bot] cca2f85ad5
chore(dev-deps): bump handlebars from 4.1.2 to 4.5.3 (#5)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-02-20 16:19:52 +08:00
Ika 82f6de006b chore: upgrade to tree-sitter-playground@0.15.9 2019-09-30 15:19:47 +08:00
Ika 1e70956efb chore: use tree-sitter-cli@0.15.9-custom 2019-09-30 15:14:55 +08:00
Ika cca06a9f61 chore(playground): update code sample 2019-09-01 02:11:29 +08:00
Ika 7efe4b31a1 chore(playground): update tree-sitter-toml.wasm 2019-09-01 01:59:14 +08:00
Ika bc4b4887c4 chore: add tree-sitter-toml.wasm 2019-09-01 01:43:24 +08:00
Ika d35266bd44 chore: remove tree-sitter-toml.wasm 2019-09-01 01:42:34 +08:00
Ika d75a021d2c chore(playground): update tree-sitter.wasm 2019-09-01 01:28:19 +08:00
Ika 122e9d62f0 chore: revert the previous commit and set *.wasm as binary 2019-09-01 01:16:46 +08:00
Ika ff0636eb83 chore(playground): use files from the official playground 2019-09-01 01:10:53 +08:00
Ika fcf85bde01 chore(playground): use relative path 2019-09-01 00:54:29 +08:00
Ika 0303643f74 chore(playground): update web-tree-sitter@0.15.9 2019-09-01 00:51:44 +08:00
Ika 2662c7d21a chore: add playground 2019-09-01 00:33:31 +08:00
Ika d34a5b2fef docs(changelog): remove wrong link 2019-08-31 22:29:21 +08:00
Ika 0911a5779f docs(readme): update example output 2019-08-31 22:21:54 +08:00
Ika d109b530c0 chore(release): 0.2.0 2019-08-31 22:18:19 +08:00
Ika 42afd6a0eb
feat: unflatten structure and rename nodes (#4)
Since the AST should reflect its logical structure as close as possible, I revert the changes from #2. This PR also renames nodes with more appropriate names.

BREAKING CHANGE:

- rename `file` with `document`.
- rename `table_array` with `table_array_element`.
- unflatten `table` and `table_array_element`, i.e., `pair`s are now their children instead of siblings.
2019-08-31 22:16:56 +08:00
Ika 000f53ee75 chore: update formatting 2019-08-22 17:22:58 +08:00
Ika 7edffec878 chore(release): 0.1.3 2019-08-21 09:14:02 +08:00
Ika 752419c33d
fix: trailing whitespaces are allowed for local_time (#3)
Input:

(each `·` indicates a whitespace)

```toml
valid·=·1979-05-27·
```

Output:

```
# before

(file
  (ERROR
    (key)))

# after

(file
  (pair
    (key) (local_date)))
```
2019-08-21 09:13:14 +08:00
Ika 9bdd88e854 chore(release): 0.1.2 2019-08-20 15:03:41 +08:00
Ika a0cd384b98 feat: rename root with file 2019-08-20 15:01:47 +08:00
Ika a3812033af
feat: flatten table/table-array structure (#2)
Input:

```toml
[table]
key = "value"
```

Output:

```sh
# before
(root
  (table
    (key)
    (pair (key) (string)))

# after
(root
  (table (key))
  (pair (key) (string)))
```
2019-08-20 14:59:19 +08:00
Ika 43595130ac chore(release): 0.1.1 2019-08-20 09:31:30 +08:00
Ika e2b28db714
fix: disallow invalid whitespaces between scalar components (#1) 2019-08-20 09:30:20 +08:00
Ika 46de5998d4 refactor: replace external tokens with internal ones 2019-08-19 23:58:20 +08:00
Ika 0a0a42230e docs(readme): prettify example output 2019-08-18 21:21:14 +08:00
Ika 0f9cc8896b chore: update gitattributes and add prepack script 2019-08-18 21:13:19 +08:00
Ika 702cf2fa55 chore(release): 0.1.0 2019-08-18 18:34:13 +08:00
Ika 5acac3958f feat: initial implementation 2019-08-18 18:30:34 +08:00