Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreamsxin/Zephir-CPP
Zephir-CPP is c++ implementation of the zephir.
https://github.com/dreamsxin/Zephir-CPP
Last synced: 18 days ago
JSON representation
Zephir-CPP is c++ implementation of the zephir.
- Host: GitHub
- URL: https://github.com/dreamsxin/Zephir-CPP
- Owner: dreamsxin
- License: mit
- Created: 2014-09-15T01:09:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-25T02:35:50.000Z (about 10 years ago)
- Last Synced: 2024-07-31T22:58:02.055Z (3 months ago)
- Language: C
- Size: 1.05 MB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Zephir-CPP
==========Zephir-CPP is c++ implementation of the zephir.
# Requirements
```shell
# Ubuntu 14.04
sudo apt-get install libboost1.54-dev
sudo apt-get install libboost-program-options1.54-dev
sudo apt-get install libboost-system1.54-dev
sudo apt-get install libboost-filesystem1.54-dev
sudo apt-get install libboost-regex1.54-dev# Ubuntu 12.04
sudo apt-get install libboost1.53-dev
sudo apt-get install libboost-program-options1.53-dev
sudo apt-get install libboost-system1.53-dev
sudo apt-get install libboost-filesystem1.53-dev
sudo apt-get install libboost-regex1.53-dev
```# 测试
```shell
./bin/zephir-cpp --run ./unit-tests/hello.zep
```
# 检测内存
```shell
valgrind --tool=memcheck --leak-check=full ./bin/zephir-cpp --run unit-tests/hello.zep
```
hello.zep
```shell
string ret, message = "hello";
int size;echo message;
let message = message + " world!";
echo message;
let size = message->length();
echo "size is " + size;
if size > 0 {
echo "size is greater zero";
while size > 0 {
let --size;
if size % 2 == 0 {
echo "size%2 == 0";
continue;
}
echo "size is " + size;
}
}echo say("Zephir");
/**
* Test function
*/
string function say(var str) {
return "My name is " + str;
}
```