https://github.com/elazarcoh/cpp2-syntax
cpp2 (cppfront) Syntax Highlighting for VSCode
https://github.com/elazarcoh/cpp2-syntax
Last synced: 18 days ago
JSON representation
cpp2 (cppfront) Syntax Highlighting for VSCode
- Host: GitHub
- URL: https://github.com/elazarcoh/cpp2-syntax
- Owner: elazarcoh
- License: mit
- Created: 2022-11-22T05:03:21.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T06:25:50.000Z (about 2 years ago)
- Last Synced: 2023-11-12T07:23:50.152Z (about 2 years ago)
- Language: C++
- Homepage: https://marketplace.visualstudio.com/items?itemName=elazarcoh.cpp2-syntax
- Size: 235 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [cpp2 (cppfront)](https://github.com/hsutter/cppfront) Syntax Highlighting for VSCode
This extension provides syntax highlighting for the experimental [cpp2](https://github.com/hsutter/cppfront) language.
It support most of the pure-cpp2 grammar to date (new syntax since last version is still on-going).
It supports highlighting of plain C++ in cpp2 source code, but we have to mark the C++ block with a special comment:
```cpp
/* lang:cpp */
int main() {
return 0;
}
/* lang:end */
```
For any issues, please file them on the [GitHub repo](https://github.com/elazarcoh/cpp2-syntax).

## Build the extension
```bash
yarn install
yarn run build
yarn run package
```
The output VSIX file is located under `cpp2`.
## Compile and run the test file
```bash
cppfront ./cpp2/test.cpp2 -import-std
clang++ -I../cppfront/source/ test.cpp -std=c++20 -o test.exe
./test.exe
```