https://github.com/wmxpy/barklang
:dog: If there are no dogs in Heaven, then when I die I want to go where they went.
https://github.com/wmxpy/barklang
ast bark barklang typescript
Last synced: about 1 year ago
JSON representation
:dog: If there are no dogs in Heaven, then when I die I want to go where they went.
- Host: GitHub
- URL: https://github.com/wmxpy/barklang
- Owner: WMXPY
- License: mit
- Created: 2018-06-17T15:55:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T19:20:46.000Z (over 6 years ago)
- Last Synced: 2025-04-13T05:02:29.426Z (about 1 year ago)
- Topics: ast, bark, barklang, typescript
- Language: TypeScript
- Homepage: https://mengw.io
- Size: 170 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
- License: LICENSE
Awesome Lists containing this project
README
# Barklang
[](https://www.npmjs.com/package/bkc)
[](https://travis-ci.org/WMXPY/Barklang)
[](https://codecov.io/gh/WMXPY/Barklang)
[](https://gitter.im/Barklang?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://www.npmjs.com/package/bkc)
:dog: If there are no dogs in Heaven, then when I die I want to go where they went.
bkc is a simple programming language, based on javascript. All bkc lang will run in a sandbox environment, so bkc is safe for untrust user input.
## Install
```bash
npm install bkc --save
```
You can use bkc in nodeJS environment or browser (commonjs)
## Usage
Use bkc without external function.
```js
import bkc from 'bkc';
// es5
const bkc = require('bkc').default;
bkc("print 'hello world!'"); // hello world!
```
Use bkc with an external function.
```js
import bkc from 'bkc';
// es5
const bkc = require('bkc').default;
bkc("hello 'hello world!'", [
{
command: 'hello',
func: (arg) => {
console.log(arg);
}
}
]); // hello world!
```
## Documents
- [Grammar and example](https://github.com/WMXPY/bkc/blob/master/docs/bkc.md)
- [Develop](https://github.com/WMXPY/bkc/blob/master/docs/develop.md)
> Created by [Ghoti-CLI](https://github.com/WMXPY/Ghoti-CLI/) 3.3.8