2022-08-04 19:05:56 +03:00
|
|
|
![onlang logo](static/logos/OnLang-transparent.png)
|
|
|
|
|
2022-08-12 15:19:49 +03:00
|
|
|
[![Crates.io](https://img.shields.io/crates/v/onlang?style=flat-square)](https://crates.io/crates/onlang)
|
2022-08-09 10:49:00 +03:00
|
|
|
|
2022-08-04 19:05:56 +03:00
|
|
|
# You may have questions
|
|
|
|
|
|
|
|
ONLang - Object Notation Language (js`ON`)
|
2022-08-16 20:53:43 +03:00
|
|
|
VSCode extension - [OnLang](https://marketplace.visualstudio.com/items?itemName=artegoser.onlang)
|
2022-08-04 19:05:56 +03:00
|
|
|
|
|
|
|
## 1. God, what the f\*\*\*\* is this
|
|
|
|
|
2022-08-06 20:00:37 +03:00
|
|
|
ONLang is an experimental, esoteric programming language, that allows you to use (**json, json5 or yaml**) for **PROGRAMMING**.
|
2022-08-04 19:05:56 +03:00
|
|
|
|
|
|
|
## 2. What is it for
|
|
|
|
|
|
|
|
For writing simple scripts.
|
|
|
|
|
2022-08-06 19:06:53 +03:00
|
|
|
## 3. How to write in this language
|
|
|
|
|
2022-08-08 17:44:49 +03:00
|
|
|
Variants of the "Hello World!"
|
|
|
|
|
|
|
|
on json5
|
|
|
|
|
|
|
|
```json5
|
|
|
|
[
|
|
|
|
"Hello world!",
|
|
|
|
["Hello", " world!" ]
|
|
|
|
{println:"Hello world!"},
|
|
|
|
{println:["Hello world!"]},
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
|
|
|
on yaml
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
main:
|
|
|
|
- Hello world!
|
|
|
|
- - Hello
|
|
|
|
- " world!"
|
|
|
|
- println: Hello world!
|
|
|
|
- println:
|
|
|
|
- Hello world!
|
|
|
|
```
|
|
|
|
|
|
|
|
Check the [Documentation](doc/main.md)
|
2022-08-06 19:06:53 +03:00
|
|
|
|
2022-08-06 19:20:42 +03:00
|
|
|
## Installation
|
|
|
|
|
2022-08-06 20:35:24 +03:00
|
|
|
`cargo install onlang`
|
2022-08-06 19:20:42 +03:00
|
|
|
or
|
|
|
|
Get binary from [releases](https://github.com/artegoser/ONLang/releases) and add the executable file to the PATH variable
|
2022-08-06 19:06:53 +03:00
|
|
|
|
|
|
|
## Using
|
2022-08-04 19:05:56 +03:00
|
|
|
|
2022-08-06 20:35:24 +03:00
|
|
|
`on examples/example.json5`
|
2022-08-04 19:05:56 +03:00
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
1. Clone this repo
|
2022-08-06 19:20:42 +03:00
|
|
|
2. `cargo run --quiet --release -- examples/example.json5`
|
2022-08-04 19:05:56 +03:00
|
|
|
|
|
|
|
If you want to help create a pull request
|
2022-08-08 16:16:45 +03:00
|
|
|
|
|
|
|
## License
|
2022-08-08 17:44:49 +03:00
|
|
|
|
|
|
|
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fartegoser%2FONLang.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fartegoser%2FONLang?ref=badge_large)
|