Skip to main content

check_declaration

Function check_declaration 

Source
pub fn check_declaration(
    env: &mut Environment,
    decl: Declaration,
) -> Result<(), KernelError>
Expand description

Check a declaration and add it to the environment.

Validates that the declaration is well-formed and type-correct, then inserts it into the environment. Returns an error if the declaration fails type checking or if the name is already declared.