Skip to main content

compile

Function compile 

Source
pub fn compile(source: &str, main_path: &str, root: &Path) -> OpyResult<Program>
Expand description

Compile one .opy source end-to-end into the Opy HIR contract: preprocess (includes/defines) → parse (CST) → lower (HIR).

main_path is the file’s display path recorded in the HIR file registry; root is the include base. compile never requires Node or OverPy.