Skip to main content

luaur_ast/records/
ast_stat.rs

1//! Generated skeleton item.
2//! Node: `cxx:Record:Luau.Ast:Ast/include/Luau/Ast.h:263:ast_stat`
3//! Source: `Ast/include/Luau/Ast.h`
4//! Graph edges:
5//! - declared_by: source_file Ast/include/Luau/Ast.h
6//! - source_includes:
7//!   - includes -> source_file Common/include/Luau/Common.h
8//!   - includes -> source_file Ast/include/Luau/Location.h
9//!   - includes -> source_file Common/include/Luau/Variant.h
10//!   - includes -> source_file VM/src/lstring.h
11//! - incoming:
12//!   - declares <- source_file Ast/include/Luau/Ast.h
13//!   - type_ref <- method AstNode::asStat (Ast/include/Luau/Ast.h)
14//!   - type_ref <- method AstStat::asStat (Ast/include/Luau/Ast.h)
15//!   - type_ref <- record AstStatBlock (Ast/include/Luau/Ast.h)
16//!   - type_ref <- record AstStatIf (Ast/include/Luau/Ast.h)
17//!   - type_ref <- record AstStatWhile (Ast/include/Luau/Ast.h)
18//!   - type_ref <- record AstStatRepeat (Ast/include/Luau/Ast.h)
19//!   - type_ref <- record AstStatBreak (Ast/include/Luau/Ast.h)
20//!   - type_ref <- record AstStatContinue (Ast/include/Luau/Ast.h)
21//!   - type_ref <- record AstStatReturn (Ast/include/Luau/Ast.h)
22//!   - type_ref <- record AstStatExpr (Ast/include/Luau/Ast.h)
23//!   - type_ref <- record AstStatLocal (Ast/include/Luau/Ast.h)
24//!   - type_ref <- record AstStatFor (Ast/include/Luau/Ast.h)
25//!   - type_ref <- record AstStatForIn (Ast/include/Luau/Ast.h)
26//!   - type_ref <- record AstStatAssign (Ast/include/Luau/Ast.h)
27//!   - type_ref <- record AstStatCompoundAssign (Ast/include/Luau/Ast.h)
28//!   - type_ref <- record AstStatFunction (Ast/include/Luau/Ast.h)
29//!   - type_ref <- record AstStatLocalFunction (Ast/include/Luau/Ast.h)
30//!   - type_ref <- record AstStatTypeAlias (Ast/include/Luau/Ast.h)
31//!   - type_ref <- record AstStatTypeFunction (Ast/include/Luau/Ast.h)
32//!   - type_ref <- record AstStatDeclareGlobal (Ast/include/Luau/Ast.h)
33//!   - type_ref <- record AstStatDeclareFunction (Ast/include/Luau/Ast.h)
34//!   - type_ref <- record AstStatClass (Ast/include/Luau/Ast.h)
35//!   - type_ref <- record AstStatDeclareExternType (Ast/include/Luau/Ast.h)
36//!   - type_ref <- record AstStatError (Ast/include/Luau/Ast.h)
37//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
38//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
39//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
40//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
41//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
42//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
43//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
44//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
45//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
46//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
47//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
48//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
49//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
50//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
51//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
52//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
53//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
54//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
55//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
56//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
57//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
58//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
59//!   - type_ref <- method AstVisitor::visit (Ast/include/Luau/Ast.h)
60//!   - type_ref <- record Parser (Ast/include/Luau/Parser.h)
61//!   - type_ref <- method AstStatBlock::AstStatBlock (Ast/src/Ast.cpp)
62//!   - type_ref <- method AstStatBlock::visit (Ast/src/Ast.cpp)
63//!   - type_ref <- method AstStatIf::AstStatIf (Ast/src/Ast.cpp)
64//!   - type_ref <- method AstStatError::AstStatError (Ast/src/Ast.cpp)
65//!   - type_ref <- function isStatLast (Ast/src/Parser.cpp)
66//!   - type_ref <- method Parser::parseBlockNoScope (Ast/src/Parser.cpp)
67//!   - type_ref <- method Parser::parseStat (Ast/src/Parser.cpp)
68//!   - type_ref <- method Parser::parseIf (Ast/src/Parser.cpp)
69//!   - type_ref <- method Parser::parseWhile (Ast/src/Parser.cpp)
70//!   - type_ref <- method Parser::parseRepeat (Ast/src/Parser.cpp)
71//!   - type_ref <- method Parser::parseDo (Ast/src/Parser.cpp)
72//!   - type_ref <- method Parser::parseBreak (Ast/src/Parser.cpp)
73//!   - type_ref <- method Parser::parseContinue (Ast/src/Parser.cpp)
74//!   - type_ref <- method Parser::parseFor (Ast/src/Parser.cpp)
75//!   - type_ref <- method Parser::parseAttributeStat (Ast/src/Parser.cpp)
76//!   - type_ref <- method Parser::parseLocal_DEPRECATED (Ast/src/Parser.cpp)
77//!   - type_ref <- method Parser::parseLocal (Ast/src/Parser.cpp)
78//!   - type_ref <- method Parser::parseReturn (Ast/src/Parser.cpp)
79//!   - type_ref <- method Parser::parseTypeAlias (Ast/src/Parser.cpp)
80//!   - type_ref <- method Parser::parseClassStat (Ast/src/Parser.cpp)
81//!   - type_ref <- method Parser::parseTypeFunction (Ast/src/Parser.cpp)
82//!   - type_ref <- method Parser::parseDeclaration (Ast/src/Parser.cpp)
83//!   - type_ref <- method Parser::parseAssignment (Ast/src/Parser.cpp)
84//!   - type_ref <- method Parser::parseExportValue (Ast/src/Parser.cpp)
85//!   - type_ref <- method Parser::parseCompoundAssignment (Ast/src/Parser.cpp)
86//!   - type_ref <- method Parser::reportStatError (Ast/src/Parser.cpp)
87//!   - type_ref <- method Printer::visualize (Ast/src/PrettyPrinter.cpp)
88//!   - type_ref <- method Printer::visualizeBlock (Ast/src/PrettyPrinter.cpp)
89//!   - type_ref <- method Compiler::alwaysTerminates (Compiler/src/Compiler.cpp)
90//!   - type_ref <- method Compiler::compileFunction (Compiler/src/Compiler.cpp)
91//!   - type_ref <- method Compiler::compileInlinedCall (Compiler/src/Compiler.cpp)
92//!   - type_ref <- method Compiler::isStatBreak (Compiler/src/Compiler.cpp)
93//!   - type_ref <- method Compiler::resolveAssignConflicts (Compiler/src/Compiler.cpp)
94//!   - type_ref <- method Compiler::compileStat (Compiler/src/Compiler.cpp)
95//!   - type_ref <- method Compiler::validateContinueUntil (Compiler/src/Compiler.cpp)
96//!   - type_ref <- method CostVisitor::visit (Compiler/src/CostModel.cpp)
97//!   - type_ref <- method TypeMapVisitor::pushTypeAliases (Compiler/src/Types.cpp)
98//!   - type_ref <- method TypeMapVisitor::visit (Compiler/src/Types.cpp)
99//!   - type_ref <- method TypeMapVisitor::visit (Compiler/src/Types.cpp)
100//!   - type_ref <- function alwaysTerminates (Compiler/src/Utils.h)
101//!   - type_ref <- record ConstraintGenerator (Analysis/include/Luau/ConstraintGenerator.h)
102//!   - type_ref <- record CFGBuilder (Analysis/include/Luau/ControlFlowGraph.h)
103//!   - type_ref <- record DataFlowGraph (Analysis/include/Luau/DataFlowGraph.h)
104//!   - type_ref <- record DataFlowGraphBuilder (Analysis/include/Luau/DataFlowGraph.h)
105//!   - type_ref <- record FragmentAutocompleteAncestryResult (Analysis/include/Luau/FragmentAutocomplete.h)
106//!   - type_ref <- record FragmentParseResult (Analysis/include/Luau/FragmentAutocomplete.h)
107//!   - type_ref <- record FragmentRegion (Analysis/include/Luau/FragmentAutocomplete.h)
108//!   - type_ref <- record Module (Analysis/include/Luau/Module.h)
109//!   - type_ref <- record TypeChecker2 (Analysis/include/Luau/TypeChecker2.h)
110//!   - type_ref <- record TypeChecker (Analysis/include/Luau/TypeInfer.h)
111//!   - type_ref <- method AstJsonEncoder::write (Analysis/src/AstJsonEncoder.cpp)
112//!   - type_ref <- method AutocompleteNodeFinder::visit (Analysis/src/AstQuery.cpp)
113//!   - type_ref <- method FindNode::visit (Analysis/src/AstQuery.cpp)
114//!   - type_ref <- method FindExprOrLocal::visit (Analysis/src/AstQuery.cpp)
115//!   - type_ref <- method ConstraintGenerator::prototypeTypeDefinitions (Analysis/src/ConstraintGenerator.cpp)
116//!   - type_ref <- method ConstraintGenerator::visitBlockWithoutChildScope (Analysis/src/ConstraintGenerator.cpp)
117//!   - type_ref <- method ConstraintGenerator::visit (Analysis/src/ConstraintGenerator.cpp)
118//!   - type_ref <- method ConstraintGenerator::visit (Analysis/src/ConstraintGenerator.cpp)
119//!   - type_ref <- method CFGBuilder::lower (Analysis/src/ControlFlowGraph.cpp)
120//!   - type_ref <- method DataFlowGraphBuilder::visitBlockWithoutChildScope (Analysis/src/DataFlowGraph.cpp)
121//!   - type_ref <- method DataFlowGraphBuilder::visit (Analysis/src/DataFlowGraph.cpp)
122//!   - type_ref <- method DataFlowGraphBuilder::visit (Analysis/src/DataFlowGraph.cpp)
123//!   - type_ref <- function getNearestIfToCursor (Analysis/src/FragmentAutocomplete.cpp)
124//!   - type_ref <- function getFragmentLocation (Analysis/src/FragmentAutocomplete.cpp)
125//!   - type_ref <- record NearestStatementFinder (Analysis/src/FragmentAutocomplete.cpp)
126//!   - type_ref <- function blockDiffStart (Analysis/src/FragmentAutocomplete.cpp)
127//!   - type_ref <- function getFragmentRegionWithBlockDiff (Analysis/src/FragmentAutocomplete.cpp)
128//!   - type_ref <- function parseFragment (Analysis/src/FragmentAutocomplete.cpp)
129//!   - type_ref <- function findAncestryForFragmentParse_DEPRECATED (Analysis/src/FragmentAutocomplete.cpp)
130//!   - type_ref <- function findClosestScope_DEPRECATED (Analysis/src/FragmentAutocomplete.cpp)
131//!   - type_ref <- function parseFragment_DEPRECATED (Analysis/src/FragmentAutocomplete.cpp)
132//!   - type_ref <- method Frontend::parse (Analysis/src/Frontend.cpp)
133//!   - type_ref <- record LintContext (Analysis/src/Linter.cpp)
134//!   - type_ref <- method LintMultiLineStatement::visit (Analysis/src/Linter.cpp)
135//!   - type_ref <- method LintUnreachableCode::analyze (Analysis/src/Linter.cpp)
136//!   - type_ref <- method LintImplicitReturn::getEndLocation (Analysis/src/Linter.cpp)
137//!   - type_ref <- method LintImplicitReturn::getValueReturn (Analysis/src/Linter.cpp)
138//!   - type_ref <- method LintImplicitReturn::visit (Analysis/src/Linter.cpp)
139//!   - type_ref <- method LintDuplicateFunction::visit (Analysis/src/Linter.cpp)
140//!   - type_ref <- function lint (Analysis/src/Linter.cpp)
141//!   - type_ref <- function synthesizeExportReturn (Analysis/src/Module.cpp)
142//!   - type_ref <- method NonStrictTypeChecker::visit (Analysis/src/NonStrictTypeChecker.cpp)
143//!   - type_ref <- method NonStrictTypeChecker::visit (Analysis/src/NonStrictTypeChecker.cpp)
144//!   - type_ref <- method NonStrictTypeChecker::visit (Analysis/src/NonStrictTypeChecker.cpp)
145//!   - type_ref <- record Node (Analysis/src/TopoSortStatements.cpp)
146//!   - type_ref <- method Node::Node (Analysis/src/TopoSortStatements.cpp)
147//!   - type_ref <- function mkName (Analysis/src/TopoSortStatements.cpp)
148//!   - type_ref <- function isToposortableNode (Analysis/src/TopoSortStatements.cpp)
149//!   - type_ref <- function containsToposortableNode (Analysis/src/TopoSortStatements.cpp)
150//!   - type_ref <- function isBlockTerminator (Analysis/src/TopoSortStatements.cpp)
151//!   - type_ref <- function drain (Analysis/src/TopoSortStatements.cpp)
152//!   - type_ref <- function containsFunctionCall (Analysis/src/TopoSortStatements.cpp)
153//!   - type_ref <- function containsFunctionCallOrReturn (Analysis/src/TopoSortStatements.cpp)
154//!   - type_ref <- function isFunction (Analysis/src/TopoSortStatements.cpp)
155//!   - type_ref <- function toposort (Analysis/src/TopoSortStatements.cpp)
156//!   - type_ref <- method TypeChecker2::hasBreak (Analysis/src/TypeChecker2.cpp)
157//!   - type_ref <- method TypeChecker2::getFallthrough (Analysis/src/TypeChecker2.cpp)
158//!   - type_ref <- method TypeChecker2::visit (Analysis/src/TypeChecker2.cpp)
159//!   - type_ref <- method TypeChecker2::visit (Analysis/src/TypeChecker2.cpp)
160//!   - type_ref <- method TypeChecker2::visit (Analysis/src/TypeChecker2.cpp)
161//!   - type_ref <- method TypeFunctionRuntime::registerFunction_DEPRECATED (Analysis/src/TypeFunctionRuntime.cpp)
162//!   - type_ref <- method TypeFunctionRuntime::registerFunction (Analysis/src/TypeFunctionRuntime.cpp)
163//!   - type_ref <- function hasBreak (Analysis/src/TypeInfer.cpp)
164//!   - type_ref <- function getFallthrough (Analysis/src/TypeInfer.cpp)
165//!   - type_ref <- method TypeChecker::check (Analysis/src/TypeInfer.cpp)
166//!   - type_ref <- method TypeChecker::checkBlockWithoutRecursionCheck (Analysis/src/TypeInfer.cpp)
167//!   - type_ref <- method TypeChecker::checkBlockTypeAliases (Analysis/src/TypeInfer.cpp)
168//!   - type_ref <- method JsonEncoderFixture::expectParseStatement (tests/AstJsonEncoder.test.cpp)
169//!   - type_ref <- function toposort (tests/TopoSort.test.cpp)
170//!   - type_ref <- method Reducer::getNestedStats (CLI/src/Reduce.cpp)
171//!   - type_ref <- method Reducer::reallocateStatements (CLI/src/Reduce.cpp)
172//!   - type_ref <- method Reducer::prunedSpan (CLI/src/Reduce.cpp)
173//!   - type_ref <- method Reducer::deleteChildStatements (CLI/src/Reduce.cpp)
174//!   - type_ref <- method Reducer::tryPromotingChildStatements (CLI/src/Reduce.cpp)
175//!   - type_ref <- method Reducer::walk (CLI/src/Reduce.cpp)
176//!   - type_ref <- method AstStat::AstStat (Ast/include/Luau/Ast.h)
177//! - outgoing:
178//!   - type_ref -> method AstStat::AstStat (Ast/include/Luau/Ast.h)
179//!   - type_ref -> record AstNode (Ast/include/Luau/Ast.h)
180//!   - translates_to -> rust_item AstStat
181
182// Ast.h:263 — class AstStat : public AstNode { bool hasSemicolon; }
183// Base-class embedding convention: concrete nodes hold `pub base: AstStat`.
184#[repr(C)]
185#[derive(Debug, Clone)]
186pub struct AstStat {
187    pub base: crate::records::ast_node::AstNode,
188    pub has_semicolon: bool,
189}