Skip to main content

luaur_ast/methods/
parser_binding_binding.rs

1use crate::records::ast_type::AstType;
2use crate::records::binding::Binding;
3use crate::records::name::Name;
4use crate::records::position::Position;
5
6impl Binding {
7    pub fn new(
8        name: Name,
9        annotation: *mut AstType,
10        colon_position: Position,
11        is_const: bool,
12    ) -> Self {
13        Self {
14            name,
15            annotation,
16            colon_position,
17            is_const,
18        }
19    }
20}
21
22#[allow(non_snake_case)]
23pub fn parser_binding_binding(
24    name: Name,
25    annotation: *mut AstType,
26    colon_position: Position,
27    is_const: bool,
28) -> Binding {
29    Binding::new(name, annotation, colon_position, is_const)
30}