https://github.com/ayonious/c-code-beautifier
✂️ A parser that can beautify Code written in C/C++
https://github.com/ayonious/c-code-beautifier
c-plus-plus ccode-beautifier compiler parser
Last synced: 5 months ago
JSON representation
✂️ A parser that can beautify Code written in C/C++
- Host: GitHub
- URL: https://github.com/ayonious/c-code-beautifier
- Owner: ayonious
- License: mit
- Created: 2016-06-07T19:06:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-14T13:13:51.000Z (about 5 years ago)
- Last Synced: 2025-05-12T15:15:43.541Z (9 months ago)
- Topics: c-plus-plus, ccode-beautifier, compiler, parser
- Language: C++
- Homepage:
- Size: 1.11 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Beautify/format your C/C++ code
[](https://travis-ci.com/ayonious/C-Code-Beautifier)
## Build instructions:
You can download the binary directly. Make sure you put the proper latest version instead of v0.7
```
curl -O "https://github.com/ayonious/C-Code-Beautifier/releases/download/v0.7/C-Code-Beautifier"
chmod +x C-Code-Beautifier
```
Or you can build it from source:
```
g++ src/Main.cpp src/parselib.cpp src/tokenlib.cpp -o C-Code-Beautifier
```
Now you will get the executables as 'C-Code-Beautifier'
## Running instructions:
```
./C-Code-Beautifier
```
Find the beautiful output in . You can try the test cases avilable in 'testcases' folder.
## Sample Input
```
#include #include if ( ) {
if ( ) the quik ;
else if ( )
asdlkfjaskdjf ;
else
asdfkljsdf ; }
```
## Sample output
```
#include
#include
if ( )
{
if ( )
the quik ;
else if ( )
asdlkfjaskdjf ;
else
asdfkljsdf ;
}
```