Skip to main content

luaur_ast/methods/
ast_expr_call_ast_expr_call.rs

1use crate::records::ast_array::AstArray;
2use crate::records::ast_expr::AstExpr;
3use crate::records::ast_expr_call::AstExprCall;
4use crate::records::ast_node::AstNode;
5use crate::records::ast_type_or_pack::AstTypeOrPack;
6use crate::records::location::Location;
7use crate::rtti::AstNodeClass;
8
9impl AstExprCall {
10    pub fn new(
11        location: Location,
12        func: *mut AstExpr,
13        args: AstArray<*mut AstExpr>,
14        self_: bool,
15        explicit_types: AstArray<AstTypeOrPack>,
16        arg_location: Location,
17    ) -> Self {
18        Self {
19            base: AstExpr {
20                base: AstNode {
21                    class_index: <Self as AstNodeClass>::CLASS_INDEX,
22                    location,
23                },
24            },
25            func,
26            type_arguments: explicit_types,
27            args,
28            self_,
29            arg_location,
30        }
31    }
32}
33
34#[allow(non_snake_case)]
35pub fn ast_expr_call_ast_expr_call(
36    location: Location,
37    func: *mut AstExpr,
38    args: AstArray<*mut AstExpr>,
39    self_: bool,
40    explicit_types: AstArray<AstTypeOrPack>,
41    arg_location: Location,
42) -> AstExprCall {
43    AstExprCall::new(location, func, args, self_, explicit_types, arg_location)
44}