Skip to main content

Crate codehelion_frontend_c

Crate codehelion_frontend_c 

Source
Expand description

C frontends for codehelion.

Fast mode implements codehelion_core::frontend::Frontend: an error-tolerant lexer paired with delimiter-matching unit-boundary detection. Nothing here preprocesses or executes the source; directives are dropped whole and macros pass through as ordinary tokens. Structural mode lives in ir: a real tree-sitter parse mapped onto the language-neutral Syntax IR.

Both modes share their machinery with the C++ frontend crate: the lexer is parameterized by a dialect::Dialect carrying the keyword set, operator inventory and dialect-only literal forms, and the structural CST walker is parameterized by an ir::IrMapping carrying the node-mapping table.

Modules§

dialect
Lexical dialect descriptions for the C language family.
ir
Structural-mode C frontend and the shared C-family CST walking machinery.
lexer
Error-tolerant lexer for the C language family.
units
Coarse unit-boundary detection over a C-family token stream.

Structs§

CFrontend
The C Fast-mode frontend.

Constants§

C_FAMILY_LEXER_VERSION
Version of the lexer and unit-boundary machinery shared by C and C++.
FRONTEND_VERSION
Version tag of this frontend, used as a fingerprint input. The C dialect revision and the shared C-family lexer revision are both part of it.