空白翻译。
whitespace的Python项目详细描述
用Python编写的用于命令式的、基于堆栈的语言的解释程序,称为Whitespace。
用法
让program.ws
成为任何Whitespace程序。要执行它,请键入:
$ whitespace program.ws
您可以在tests/fixtures找到示例Whitespace程序。
例如,这里是factorial program:
$ whitespace fact.ws Enter a number: 4040! =815915283247897734345611269596115894272000000000
开发
推荐工具:
克隆存储库并安装依赖项:
$ git clone git@github.com:dwayne/whitespace-python.git
$ cd whitespace-python
$ pipenv shell
$ pipenv install --dev
你们现在都准备好开始发展了。
测试
测试是使用内置的单元测试框架unittest编写的。
运行所有测试。
$ python -m unittest
运行特定的测试模块。
$ python -m unittest tests.test_parser
运行特定的测试用例。
$ python -m unittest tests.test_parser.ParserTestCase.test_it_parses_push
学分
感谢Edwin Brady和chris morris设计/开发这种编程语言;他们也是Idris编程语言的开发人员。