ruanjiancheng / iris

计算器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iris

一个使用 cpp 编写的简单脚本。

构建项目:

mkdir build

cd /build

cmake ..

make
\iris\build>.\main_cmake
Welcome to iris!

>>> int a = 10;
--- output ---
<- 10

>>> int b = a * 10 + (1 + 3) * (2);
--- output ---
<- 108

>>> a + b;
--- output ---
<- 118

>>> exit();
good bye!

使用 -v 可以查看当前脚本的 AST

\iris\build>.\main_cmake -v
verbose mode
Welcome to iris!

>>> int a = 10 + 20;
 pwc
         a
                 +
                         10
                         20
--- output ---
<- 30

>>> a;
 pwc
         a
--- output ---
<- 30

About

计算器


Languages

Language:C++ 92.6%Language:C 5.2%Language:CMake 2.2%