luaur-ast 0.1.3

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Faithful port of Luau `AstExpr : AstNode` (`Ast/include/Luau/Ast.h`).
//!
//! The abstract base of every expression node. It adds no fields over `AstNode`
//! (only the `as_expr` override). `#[repr(C)]` with `base` first keeps the
//! `AstNode` subobject at offset 0 so the RTTI pointer casts in [`crate::rtti`]
//! are sound.

use crate::records::ast_node::AstNode;

#[repr(C)]
#[derive(Debug, Clone)]
pub struct AstExpr {
    pub base: AstNode,
}