luaur_ast/methods/
ast_stat_error_ast_stat_error.rs1use crate::records::ast_array::AstArray;
2use crate::records::ast_expr::AstExpr;
3use crate::records::ast_stat::AstStat;
4use crate::records::ast_stat_error::AstStatError;
5use crate::records::location::Location;
6
7impl AstStatError {
8 pub fn new(
9 location: Location,
10 expressions: AstArray<*mut AstExpr>,
11 statements: AstArray<*mut AstStat>,
12 message_index: u32,
13 ) -> Self {
14 AstStatError {
15 base: AstStat {
16 base: crate::records::ast_node::AstNode {
17 class_index: <Self as crate::rtti::AstNodeClass>::CLASS_INDEX,
18 location,
19 },
20 has_semicolon: false,
21 },
22 expressions,
23 statements,
24 message_index,
25 }
26 }
27}
28
29#[allow(non_snake_case)]
30pub fn ast_stat_error_ast_stat_error(
31 location: Location,
32 expressions: AstArray<*mut AstExpr>,
33 statements: AstArray<*mut AstStat>,
34 message_index: u32,
35) -> AstStatError {
36 AstStatError::new(location, expressions, statements, message_index)
37}