[−][src]Crate swipc_parser
Efficient parser for the SwIPC files
SwIPC is your one-stop-shop for Nintendo Switch IPC definitions. The format is documented on the SwIPC repo. This crate can parse the SwIPC auto.id file almost instantaneously, removing the need for the old python parser's need for caches.
The main entry-point for this crate is the parse function, which takes a string containing the content you want to parse, and returns a Ctx struct containing all the definitions parsed. If the file didn't parse, we panic.
Example
use swipc_parser::parse; let ctx = parse(vi); let vi = &ctx.interfaces["libuser::vi::ViInterface"]; for func in &vi.funcs { println!("[{}] {}: {}", func.num, func.name, func.doc); }
Modules
pest_parser |
Structs
Ctx | The context returned by a successful parse. Contains convenient hashmaps to access types and interfaces from their fully qualified name. |
Enum | Enum definition. |
Func | A function on an interface. |
Interface | An interface definition. |
Struct | Struct definition. |
TypeDef | A new type definition. |
Enums
Alias | A type alias. |
Decorator | Represents a decorator. |
Def | A top-level item. Can either be a type definition, or an interface. |
HandleType | Type of a Handle. Represents all the kernel handle types on the Horizon/NX kernel. |
Type | A new type definition. |