luaur_ast/records/
entry.rs1use crate::enums::type_lexer::Type;
2use crate::records::ast_name::AstName;
3
4#[derive(Debug, Clone, Copy)]
5pub struct Entry {
6 pub value: AstName,
7 pub length: u32,
8 pub r#type: Type,
9}
10
11impl Entry {
12 pub const fn new(value: AstName, length: u32, r#type: Type) -> Self {
13 Self {
14 value,
15 length,
16 r#type,
17 }
18 }
19}
20
21impl Default for Entry {
22 fn default() -> Self {
23 Entry {
24 value: AstName {
25 value: core::ptr::null(),
26 },
27 length: 0,
28 r#type: Type::Eof,
29 }
30 }
31}