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