Skip to main content

luaur_ast/methods/
ast_stat_declare_function_is_checked_function.rs

1//! `AstStatDeclareFunction::isCheckedFunction` (`Ast/src/Ast.cpp:1051`).
2//! Hand-ported (the scheduler mutually false-blocks it against the identically
3//! named `AstTypeFunction::isCheckedFunction` via a bare-name method edge).
4
5use crate::records::ast_attr::AstAttrType;
6use crate::records::ast_stat_declare_function::AstStatDeclareFunction;
7
8impl AstStatDeclareFunction {
9    pub fn is_checked_function(&self) -> bool {
10        for &attr in self.attributes.iter() {
11            if !attr.is_null() && unsafe { (*attr).r#type } == AstAttrType::Checked {
12                return true;
13            }
14        }
15        false
16    }
17}