Crates.io | CatParser |
lib.rs | CatParser |
version | 0.1.0 |
source | src |
created_at | 2023-10-12 16:56:26.188744 |
updated_at | 2023-10-12 16:56:26.188744 |
description | C/C++ code parser written in Rust |
homepage | |
repository | https://github.com/Voluptua/CatParser |
max_upload_size | |
id | 1001467 |
size | 38,209 |
CatParser is a C/C++ code parser which allows the user to edit the code more easily and flexible. It's written in Rust, but why would you use it? Well, this project was created for other people to create their own Pokémon decompilation ROM-hacking tools that allows the user to EASILY read and write to C code, but of course, can be used for other projects as well.
This repository was just recently created. However, since I am working on my ROM-hacking tool Porydelete
and I need to edit C code as well, I will be working on this once I get more time to work on it and have enough knowledge about regular expressions in the Rust programming language.
Here's some example code:
use catparser::catparser;
use std::collections::HashMap;
fn main() {
let contents = catparser::parse("./example.c")?; // Reads the C code from ./example.c
let map = catparser::deserialize(&contents); // Deserializes the contents
let _ = map.remove("SampleFunction()"); // Removes the sample function from the code
// --snip--
}