Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/protoncr/tl_parser
Type Language parser for Crystal
https://github.com/protoncr/tl_parser
crystal crystal-lang crystal-language mtproto telegram tl type-language
Last synced: about 1 month ago
JSON representation
Type Language parser for Crystal
- Host: GitHub
- URL: https://github.com/protoncr/tl_parser
- Owner: protoncr
- License: mit
- Created: 2020-04-21T23:32:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-24T22:48:55.000Z (about 3 years ago)
- Last Synced: 2024-10-25T01:25:55.053Z (3 months ago)
- Topics: crystal, crystal-lang, crystal-language, mtproto, telegram, tl, type-language
- Language: Crystal
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TLParser
This library makes parsing `.tl` files with Crystal simple. It's about 95% complete, and will allow the parsing of most [Type Language](https://core.telegram.org/mtproto/TL) grammars.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
tl_parser:
github: protoncr/tl_parser
```2. Run `shards install`
## Usage
```crystal
require "tl_parser"data = File.read("api.tl")
defs = TLParser.parse(data)pp defs
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Chris Watzon](https://github.com/watzon) - creator and maintainer