luaur_analysis/functions/is_simple_interpolated_string.rs
1use luaur_ast::records::ast_expr_interp_string::AstExprInterpString;
2use luaur_ast::records::ast_node::AstNode;
3
4pub fn is_simple_interpolated_string(node: *const AstNode) -> bool {
5 if node.is_null() {
6 return false;
7 }
8
9 let interp_string = unsafe { (*node).as_item::<AstExprInterpString>() };
10
11 if interp_string.is_null() {
12 return false;
13 }
14
15 unsafe { (*interp_string).expressions.len() == 0 }
16}