luaur-ast 0.1.0

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
//! Generated skeleton item.
//! Node: `cxx:Record:Luau.Ast:Ast/include/Luau/Ast.h:263:ast_stat`
//! Source: `Ast/include/Luau/Ast.h`
//! Graph edges:
//! - declared_by: source_file Ast/include/Luau/Ast.h
//! - source_includes:
//!   - includes -> source_file Common/include/Luau/Common.h
//!   - includes -> source_file Ast/include/Luau/Location.h
//!   - includes -> source_file Common/include/Luau/Variant.h
//!   - includes -> source_file VM/src/lstring.h
//! - incoming:
//!   - declares <- source_file Ast/include/Luau/Ast.h
//!   - type_ref <- method AstNode::asStat (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstStat::asStat (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatBlock (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatIf (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatWhile (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatRepeat (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatBreak (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatContinue (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatReturn (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatExpr (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatLocal (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatFor (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatForIn (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatAssign (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatCompoundAssign (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatFunction (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatLocalFunction (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatTypeAlias (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatTypeFunction (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatDeclareGlobal (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatDeclareFunction (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatClass (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatDeclareExternType (Ast/include/Luau/Ast.h)
//!   - type_ref <- record AstStatError (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
//!   - type_ref <- record Parser (Ast/include/Luau/Parser.h)
//!   - type_ref <- method AstStatBlock::AstStatBlock (Ast/src/Ast.cpp)
//!   - type_ref <- method AstStatBlock::visit (Ast/src/Ast.cpp)
//!   - type_ref <- method AstStatIf::AstStatIf (Ast/src/Ast.cpp)
//!   - type_ref <- method AstStatError::AstStatError (Ast/src/Ast.cpp)
//!   - type_ref <- function isStatLast (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseBlockNoScope (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseStat (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseIf (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseWhile (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseRepeat (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseDo (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseBreak (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseContinue (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseFor (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseAttributeStat (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseLocal_DEPRECATED (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseLocal (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseReturn (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseTypeAlias (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseClassStat (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseTypeFunction (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseDeclaration (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseAssignment (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseExportValue (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::parseCompoundAssignment (Ast/src/Parser.cpp)
//!   - type_ref <- method Parser::reportStatError (Ast/src/Parser.cpp)
//!   - type_ref <- method Printer::visualize (Ast/src/PrettyPrinter.cpp)
//!   - type_ref <- method Printer::visualizeBlock (Ast/src/PrettyPrinter.cpp)
//!   - type_ref <- method Compiler::alwaysTerminates (Compiler/src/Compiler.cpp)
//!   - type_ref <- method Compiler::compileFunction (Compiler/src/Compiler.cpp)
//!   - type_ref <- method Compiler::compileInlinedCall (Compiler/src/Compiler.cpp)
//!   - type_ref <- method Compiler::isStatBreak (Compiler/src/Compiler.cpp)
//!   - type_ref <- method Compiler::resolveAssignConflicts (Compiler/src/Compiler.cpp)
//!   - type_ref <- method Compiler::compileStat (Compiler/src/Compiler.cpp)
//!   - type_ref <- method Compiler::validateContinueUntil (Compiler/src/Compiler.cpp)
//!   - type_ref <- method CostVisitor::visit (Compiler/src/CostModel.cpp)
//!   - type_ref <- method TypeMapVisitor::pushTypeAliases (Compiler/src/Types.cpp)
//!   - type_ref <- method TypeMapVisitor::visit (Compiler/src/Types.cpp)
//!   - type_ref <- method TypeMapVisitor::visit (Compiler/src/Types.cpp)
//!   - type_ref <- function alwaysTerminates (Compiler/src/Utils.h)
//!   - type_ref <- record ConstraintGenerator (Analysis/include/Luau/ConstraintGenerator.h)
//!   - type_ref <- record CFGBuilder (Analysis/include/Luau/ControlFlowGraph.h)
//!   - type_ref <- record DataFlowGraph (Analysis/include/Luau/DataFlowGraph.h)
//!   - type_ref <- record DataFlowGraphBuilder (Analysis/include/Luau/DataFlowGraph.h)
//!   - type_ref <- record FragmentAutocompleteAncestryResult (Analysis/include/Luau/FragmentAutocomplete.h)
//!   - type_ref <- record FragmentParseResult (Analysis/include/Luau/FragmentAutocomplete.h)
//!   - type_ref <- record FragmentRegion (Analysis/include/Luau/FragmentAutocomplete.h)
//!   - type_ref <- record Module (Analysis/include/Luau/Module.h)
//!   - type_ref <- record TypeChecker2 (Analysis/include/Luau/TypeChecker2.h)
//!   - type_ref <- record TypeChecker (Analysis/include/Luau/TypeInfer.h)
//!   - type_ref <- method AstJsonEncoder::write (Analysis/src/AstJsonEncoder.cpp)
//!   - type_ref <- method AutocompleteNodeFinder::visit (Analysis/src/AstQuery.cpp)
//!   - type_ref <- method FindNode::visit (Analysis/src/AstQuery.cpp)
//!   - type_ref <- method FindExprOrLocal::visit (Analysis/src/AstQuery.cpp)
//!   - type_ref <- method ConstraintGenerator::prototypeTypeDefinitions (Analysis/src/ConstraintGenerator.cpp)
//!   - type_ref <- method ConstraintGenerator::visitBlockWithoutChildScope (Analysis/src/ConstraintGenerator.cpp)
//!   - type_ref <- method ConstraintGenerator::visit (Analysis/src/ConstraintGenerator.cpp)
//!   - type_ref <- method ConstraintGenerator::visit (Analysis/src/ConstraintGenerator.cpp)
//!   - type_ref <- method CFGBuilder::lower (Analysis/src/ControlFlowGraph.cpp)
//!   - type_ref <- method DataFlowGraphBuilder::visitBlockWithoutChildScope (Analysis/src/DataFlowGraph.cpp)
//!   - type_ref <- method DataFlowGraphBuilder::visit (Analysis/src/DataFlowGraph.cpp)
//!   - type_ref <- method DataFlowGraphBuilder::visit (Analysis/src/DataFlowGraph.cpp)
//!   - type_ref <- function getNearestIfToCursor (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function getFragmentLocation (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- record NearestStatementFinder (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function blockDiffStart (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function getFragmentRegionWithBlockDiff (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function parseFragment (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function findAncestryForFragmentParse_DEPRECATED (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function findClosestScope_DEPRECATED (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- function parseFragment_DEPRECATED (Analysis/src/FragmentAutocomplete.cpp)
//!   - type_ref <- method Frontend::parse (Analysis/src/Frontend.cpp)
//!   - type_ref <- record LintContext (Analysis/src/Linter.cpp)
//!   - type_ref <- method LintMultiLineStatement::visit (Analysis/src/Linter.cpp)
//!   - type_ref <- method LintUnreachableCode::analyze (Analysis/src/Linter.cpp)
//!   - type_ref <- method LintImplicitReturn::getEndLocation (Analysis/src/Linter.cpp)
//!   - type_ref <- method LintImplicitReturn::getValueReturn (Analysis/src/Linter.cpp)
//!   - type_ref <- method LintImplicitReturn::visit (Analysis/src/Linter.cpp)
//!   - type_ref <- method LintDuplicateFunction::visit (Analysis/src/Linter.cpp)
//!   - type_ref <- function lint (Analysis/src/Linter.cpp)
//!   - type_ref <- function synthesizeExportReturn (Analysis/src/Module.cpp)
//!   - type_ref <- method NonStrictTypeChecker::visit (Analysis/src/NonStrictTypeChecker.cpp)
//!   - type_ref <- method NonStrictTypeChecker::visit (Analysis/src/NonStrictTypeChecker.cpp)
//!   - type_ref <- method NonStrictTypeChecker::visit (Analysis/src/NonStrictTypeChecker.cpp)
//!   - type_ref <- record Node (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- method Node::Node (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function mkName (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function isToposortableNode (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function containsToposortableNode (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function isBlockTerminator (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function drain (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function containsFunctionCall (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function containsFunctionCallOrReturn (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function isFunction (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- function toposort (Analysis/src/TopoSortStatements.cpp)
//!   - type_ref <- method TypeChecker2::hasBreak (Analysis/src/TypeChecker2.cpp)
//!   - type_ref <- method TypeChecker2::getFallthrough (Analysis/src/TypeChecker2.cpp)
//!   - type_ref <- method TypeChecker2::visit (Analysis/src/TypeChecker2.cpp)
//!   - type_ref <- method TypeChecker2::visit (Analysis/src/TypeChecker2.cpp)
//!   - type_ref <- method TypeChecker2::visit (Analysis/src/TypeChecker2.cpp)
//!   - type_ref <- method TypeFunctionRuntime::registerFunction_DEPRECATED (Analysis/src/TypeFunctionRuntime.cpp)
//!   - type_ref <- method TypeFunctionRuntime::registerFunction (Analysis/src/TypeFunctionRuntime.cpp)
//!   - type_ref <- function hasBreak (Analysis/src/TypeInfer.cpp)
//!   - type_ref <- function getFallthrough (Analysis/src/TypeInfer.cpp)
//!   - type_ref <- method TypeChecker::check (Analysis/src/TypeInfer.cpp)
//!   - type_ref <- method TypeChecker::checkBlockWithoutRecursionCheck (Analysis/src/TypeInfer.cpp)
//!   - type_ref <- method TypeChecker::checkBlockTypeAliases (Analysis/src/TypeInfer.cpp)
//!   - type_ref <- method JsonEncoderFixture::expectParseStatement (tests/AstJsonEncoder.test.cpp)
//!   - type_ref <- function toposort (tests/TopoSort.test.cpp)
//!   - type_ref <- method Reducer::getNestedStats (CLI/src/Reduce.cpp)
//!   - type_ref <- method Reducer::reallocateStatements (CLI/src/Reduce.cpp)
//!   - type_ref <- method Reducer::prunedSpan (CLI/src/Reduce.cpp)
//!   - type_ref <- method Reducer::deleteChildStatements (CLI/src/Reduce.cpp)
//!   - type_ref <- method Reducer::tryPromotingChildStatements (CLI/src/Reduce.cpp)
//!   - type_ref <- method Reducer::walk (CLI/src/Reduce.cpp)
//!   - type_ref <- method AstStat::AstStat (Ast/include/Luau/Ast.h)
//! - outgoing:
//!   - type_ref -> method AstStat::AstStat (Ast/include/Luau/Ast.h)
//!   - type_ref -> record AstNode (Ast/include/Luau/Ast.h)
//!   - translates_to -> rust_item AstStat

// Ast.h:263 — class AstStat : public AstNode { bool hasSemicolon; }
// Base-class embedding convention: concrete nodes hold `pub base: AstStat`.
#[repr(C)]
#[derive(Debug, Clone)]
pub struct AstStat {
    pub base: crate::records::ast_node::AstNode,
    pub has_semicolon: bool,
}