luaur_compiler/methods/compiler_is_constant.rs
1use crate::enums::type_constant_folding::Type;
2use crate::records::compiler::Compiler;
3use luaur_ast::records::ast_expr::AstExpr;
4
5impl Compiler {
6 pub fn is_constant(&mut self, node: *mut AstExpr) -> bool {
7 if let Some(cv) = self.constants.find(&node) {
8 return cv.r#type != Type::Type_Unknown;
9 }
10 false
11 }
12}