IECCheckerCore.Ast_utilmodule S = SyntaxHelpers to work with AST
module TI = Tok_infoval expr_to_stmts : S.expr -> S.statement listexpr_to_stmts expr Convert expr to a list of statements.
val get_var_decls : S.iec_library_element -> S.VarDecl.t listget_var_decls elem Get all variable declarations from the given elem.
val get_pou_stmts : S.iec_library_element -> S.statement listRecursively get all statements from a given POU
val get_top_stmts : S.iec_library_element -> S.statement listget_top_stmts pou Non-recursively get statements from a pou.
val get_stmts_num : S.iec_library_element -> intget_stmts_num elem Return number of statements from elem including nested ones.
val get_stmts : S.iec_library_element list -> S.statement listCollect all statements from each POU
val get_pou_exprs : S.iec_library_element -> S.expr listCollect the expressions from each statement of the POU
val get_var_uses : S.iec_library_element -> S.VarUse.t listCollect all VarUse from the given POU
val filter_exprs : f:(S.expr -> bool) -> S.iec_library_element -> S.expr listfilter_exprs f elem Return list of expressions that satisfy the predicate function f.
val get_ti_by_name_exn : S.iec_library_element -> string -> TI.tget_ti_by_name_exn elem name Get token info for variable declaration by it name.
val create_envs : S.iec_library_element list -> Env.t listCreate the environments for a given configuration elements
val eval_array_capacity : S.arr_subrange list -> inteval_array_capacity subranges Evaluate maximum capacity of the array with respect to subranges.