Expand description
This crate provides simple bindings for orangeduck’s mpc library. This is still a work in progress and contains a modified version of mpc and some temporary glue code
Modules§
- ast
 - Contains an AST type to which 
mpc_ast_tis mapped - colors
 - Contains consts for ANSI color escape sequences
 - glue
 - Contains the rust-side of glue code.
The main purpose of the code is to avoid having to
interface with a C union in Rust. The main offender
is 
mpc_result_t - macros
 - Contains some nice macros to help with needed FFI and parser creation The str_c! and c_str! macros exist because of ownership issues
 - mpc_c
 - Contains 
mpcfunction definitions - mpc_
c_ types  - Contains a Rust representation of mpc’s underlying C types
that are exposed in the 
mpc.hheader 
Macros§
- c_str
 - Convert a rustic string (whether 
&strorString) to C’sconst char* - dfs
 - Dereference pointer and convert struct member 
memtoString - dfu
 - Dereference pointer and convert struct member 
memtousize - g_
string  - simulate C’s compile time string literal concatenation to allow copy-pasta of mpc grammars written in C without any hassle
 - parser
 - Create a 
mpc_parser_tusingmpca_langgrammars - run_
parser  - Runs a parser prepared with 
parser! - str_c
 - Convert a C’s 
const char*to a rusticString - trace
 print!for lazy people - no format, args are thrown in delimited with spaces- traceln
 println!for lazy people - no format, args are thrown in delimited with spaces also throw in a newline