用纯python编写的非常简单的解释器
vsi的Python项目详细描述
vsi
用纯python编写的非常简单的解释器 第三方依赖关系。
快速启动
# this is a comment# variablesx:=1;y:=x+2;# printingprintx;printy;# if statementsify>xthenz:=y;# optional elseelsez:=x;done# while statemntwhilex<5dox:=x+1;printx;done
将此文件保存到hello.vsi文件,然后
$ vsi hello.vsi
输出
132345
请参见示例/文件夹中的更多示例
是否经过测试
是,请执行以下步骤:
$ # first clone the repository $ git clone https://github.com/afaki077/vsi.git $ # change directory to the clone repository $ cd vsi $ # install required packages for testing $ pip install -r test-requirements.txt $ # let's run tests $ py.test
许可证
mit
有关详细信息,请参见许可证文件。