An open API service indexing awesome lists of open source software.

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++

Awesome Lists containing this project

README

          

# Beautify/format your C/C++ code
[![Build Status](https://travis-ci.com/ayonious/C-Code-Beautifier.svg?branch=master)](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 ;
}
```