luaur_ast/methods/
cst_expr_table_cst_expr_table.rs1use crate::records::ast_array::AstArray;
2use crate::records::cst_expr_table::{CstExprTable, CstExprTableItem};
3use crate::records::cst_node::CstNode;
4use crate::rtti::CstNodeClass;
5
6impl CstExprTable {
7 pub fn new(items: AstArray<CstExprTableItem>) -> Self {
8 Self {
9 base: CstNode {
10 class_index: <Self as CstNodeClass>::CLASS_INDEX,
11 },
12 items,
13 }
14 }
15}
16
17#[allow(non_snake_case)]
18pub fn cst_expr_table_cst_expr_table(items: AstArray<CstExprTableItem>) -> CstExprTable {
19 CstExprTable::new(items)
20}