Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinmk/tree-sitter-ini
tree-sitter grammar/parser for INI files
https://github.com/justinmk/tree-sitter-ini
tree-sitter tree-sitter-parser
Last synced: 3 months ago
JSON representation
tree-sitter grammar/parser for INI files
- Host: GitHub
- URL: https://github.com/justinmk/tree-sitter-ini
- Owner: justinmk
- License: apache-2.0
- Created: 2020-08-02T23:15:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-01T23:31:10.000Z (5 months ago)
- Last Synced: 2024-10-12T22:54:32.198Z (4 months ago)
- Topics: tree-sitter, tree-sitter-parser
- Language: JavaScript
- Homepage:
- Size: 79.1 KB
- Stars: 21
- Watchers: 3
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tree-sitter-ini
==================This grammar implements the [INI format](https://en.wikipedia.org/wiki/INI_file).
Overview
--------Example INI file:
```ini
[section 1]
some_key = some_value
another-key = another value[another section]
# Keys may contain whitespace.
key 1 = value 1
# Value may be empty.
key_2 =
```See [test/corpus/](./test/corpus/) for more examples.
Notes
------ Section name must appear on a line by itself.
- Equals sign (=) and semicolon (;) are [reserved characters](https://en.wikipedia.org/wiki/INI_file#Key-value_pairs)
and cannot appear in the key. Any whitespace surrounding the key is stripped.
- Comments (`;` or `#`) must start at column 1. Trailing comments are not supported yet. [#13](https://github.com/justinmk/tree-sitter-ini/issues/13)
- Duplicate names are not checked.
- Line continuations (`\`) are not supported.
- `setting_value` includes whitespace. [#3](https://github.com/justinmk/tree-sitter-ini/issues/3).
Should values exclude surrounding whitespace?
- [Quoted keys/values](https://en.wikipedia.org/wiki/INI_file#Quoted_values) are not supported yet.
- Escape sequences are not supported.Reference
---------- https://en.wikipedia.org/wiki/INI_file
- https://github.com/textmate/ini.tmbundleRelease
-------Steps to perform a release:
1. Bump and tag the version (choose `patch`/`minor`/`major` as appropriate).
```
npm version patch -m "release %s"
```
2. Bump to prerelease, without creating a tag .
```
npm version --no-git-tag-version prerelease --preid dev && git add package*.json && git commit -m bump
```
3. Push.
```
git push --follow-tags
```
4. Release the tagged commit: https://github.com/justinmk/tree-sitter-ini/releases/new