https://github.com/doodlewind/ove-lang
👓 ove-lang, a language for his true fans.
https://github.com/doodlewind/ove-lang
Last synced: about 1 year ago
JSON representation
👓 ove-lang, a language for his true fans.
- Host: GitHub
- URL: https://github.com/doodlewind/ove-lang
- Owner: doodlewind
- Created: 2017-01-15T18:34:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-16T00:53:32.000Z (over 9 years ago)
- Last Synced: 2025-05-28T01:47:29.439Z (about 1 year ago)
- Language: HTML
- Homepage: http://ewind.us/h5/ove-lang/demo
- Size: 19.5 KB
- Stars: 26
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ove-lang
哦语言: 一门真正粉丝的编程语言
## 使用
在 Node 环境下使用(支持 Node V6 及以上):
``` text
npm install -g ove-lang
```
从终端读取语句并执行:
``` text
$ ove-lang '(+ 1 2)'
$ 3
```
## API
``` js
const ove = require('ove-lang')
ove.exec(text, hasPreprocess = true)
```
输入源码 `text`,返回语言执行结果。当可选的 `hasPreprocess` 为 `false` 时,不进行替换中文关键字的预处理,将 `text` 作为 Scheme 源码执行。
## 开发
安装依赖:
``` text
npm install
```
运行开发模式,将监听源文件变更:
``` text
npm run dev
```
运行生产模式,将压缩打包文件:
``` text
npm run prod
```
测试:
``` text
node test
```
## Changelog
* `0.3.0` 增加 demo 页示例
* `0.2.1` 修复浏览器 API
* `0.2.0`
* 实现预处理器
* 实现词法分析器
* 支持浮点数
* 添加测试用例
* 适配 Node 与浏览器环境
* `0.1.0` 实现 scheme 核心子集
## License
MIT