Warning
Currently a proof of concept.
Syrinx is a superset of C++ that adds syntax and features from higher level languages.
Currently Syrinx includes:
| Keyword | Description | Examples |
|---|---|---|
| in | Checks if a container has a value | 3 in vector, "foo" in list |
Including Syrinx in your project is trivial, as it is a header only library.
Simply copy syrinxlib/Include/Syrinx to wherever you want in your project's structure.
Afterwords configure your preferred build tool to transpile the *.syr.cpp/*.syr/*.syrinx/etc. files into *.cpp with stp.
Here is an example with CMake:
CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(version 3.26.4)
PROJECT(SyrinxClient)
EXECUTE_PROCESS(COMMAND stp ${PROJECT_SOURCE_DIR} --recursive)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/Include)
ADD_EXECUTABLE(SyrinxClient main.cpp)main.syr.cpp
#include <iostream>
#include <vector>
#include <list>
int main(int argc, char *argv[])
{
std::vector<int> vector = {1, 2, 3};
std::list<std::string> list = {"foo", "bar", "baz"};
if (3 in vector && "foo" in list)
{
std::cout << "3 is in vector and foo is in list" << std::endl;
}
return 0;
}
Afterwards build and run your project as usual.
mkdir Build
cd Build
cmake .. -G "Unix Makefiles"
make
./SyrinxClient.exe- Visual Studio Code Extension for syntax highlighting
- Proper client example
- C++ unit tests
- Visual Studio Code settings for each sub-project