Skip to main content

luaur_analysis/records/
source_module.rs

1//! Generated skeleton item.
2//! Node: `cxx:Record:Luau.Analysis:Analysis/include/Luau/Module.h:36:source_module`
3//! Source: `Analysis/include/Luau/Module.h`
4//! Graph edges:
5//! - declared_by: source_file Analysis/include/Luau/Module.h
6//! - source_includes:
7//!   - includes -> source_file Analysis/include/Luau/Error.h
8//!   - includes -> source_file Analysis/include/Luau/Linter.h
9//!   - includes -> source_file Analysis/include/Luau/FileResolver.h
10//!   - includes -> source_file Ast/include/Luau/ParseOptions.h
11//!   - includes -> source_file Ast/include/Luau/ParseResult.h
12//!   - includes -> source_file Analysis/include/Luau/Scope.h
13//!   - includes -> source_file Analysis/include/Luau/TypeArena.h
14//!   - includes -> source_file Analysis/include/Luau/DataFlowGraph.h
15//! - incoming:
16//!   - declares <- source_file Analysis/include/Luau/Module.h
17//!   - type_ref <- record LoadDefinitionFileResult (Analysis/include/Luau/Frontend.h)
18//!   - type_ref <- record FrontendOptions (Analysis/include/Luau/Frontend.h)
19//!   - type_ref <- record Frontend (Analysis/include/Luau/Frontend.h)
20//!   - type_ref <- record GlobalTypes (Analysis/include/Luau/GlobalTypes.h)
21//!   - type_ref <- record TypeChecker2 (Analysis/include/Luau/TypeChecker2.h)
22//!   - type_ref <- record TypeChecker (Analysis/include/Luau/TypeInfer.h)
23//!   - type_ref <- function findAncestryAtPositionForAutocomplete (Analysis/src/AstQuery.cpp)
24//!   - type_ref <- function findAstAncestryOfPosition (Analysis/src/AstQuery.cpp)
25//!   - type_ref <- function findNodeAtPosition (Analysis/src/AstQuery.cpp)
26//!   - type_ref <- function findExprAtPosition (Analysis/src/AstQuery.cpp)
27//!   - type_ref <- function findTypeAtPosition (Analysis/src/AstQuery.cpp)
28//!   - type_ref <- function findExpectedTypeAtPosition (Analysis/src/AstQuery.cpp)
29//!   - type_ref <- function findBindingLocalStatement (Analysis/src/AstQuery.cpp)
30//!   - type_ref <- function findBindingAtPosition (Analysis/src/AstQuery.cpp)
31//!   - type_ref <- function findExprOrLocalAtPosition (Analysis/src/AstQuery.cpp)
32//!   - type_ref <- function getDocumentationSymbolAtPosition (Analysis/src/AstQuery.cpp)
33//!   - type_ref <- function autocomplete (Analysis/src/Autocomplete.cpp)
34//!   - type_ref <- record BuildQueueItem (Analysis/src/Frontend.cpp)
35//!   - type_ref <- function parseSourceForModule (Analysis/src/Frontend.cpp)
36//!   - type_ref <- method Frontend::loadDefinitionFile (Analysis/src/Frontend.cpp)
37//!   - type_ref <- method Frontend::getRequiredScripts (Analysis/src/Frontend.cpp)
38//!   - type_ref <- method Frontend::addBuildQueueItems (Analysis/src/Frontend.cpp)
39//!   - type_ref <- method Frontend::checkBuildQueueItem (Analysis/src/Frontend.cpp)
40//!   - type_ref <- method Frontend::getModuleEnvironment (Analysis/src/Frontend.cpp)
41//!   - type_ref <- method Frontend::getSourceModule (Analysis/src/Frontend.cpp)
42//!   - type_ref <- method Frontend::getSourceModule (Analysis/src/Frontend.cpp)
43//!   - type_ref <- function check (Analysis/src/Frontend.cpp)
44//!   - type_ref <- method Frontend::check (Analysis/src/Frontend.cpp)
45//!   - type_ref <- method Frontend::getSourceNode (Analysis/src/Frontend.cpp)
46//!   - type_ref <- method Frontend::parse (Analysis/src/Frontend.cpp)
47//!   - type_ref <- function isWithinComment (Analysis/src/Module.cpp)
48//!   - type_ref <- function isWithinHotComment (Analysis/src/Module.cpp)
49//!   - type_ref <- function checkNonStrict (Analysis/src/NonStrictTypeChecker.cpp)
50//!   - type_ref <- function attachTypeData (Analysis/src/TypeAttach.cpp)
51//!   - type_ref <- function check (Analysis/src/TypeChecker2.cpp)
52//!   - type_ref <- method TypeChecker2::TypeChecker2 (Analysis/src/TypeChecker2.cpp)
53//!   - type_ref <- method TypeChecker::check (Analysis/src/TypeInfer.cpp)
54//!   - type_ref <- method TypeChecker::checkWithoutRecursionCheck (Analysis/src/TypeInfer.cpp)
55//!   - type_ref <- function reportModuleResult (CLI/src/Analyze.cpp)
56//!   - type_ref <- method DocumentationSymbolFixture::getDocSymbol (tests/AstQuery.test.cpp)
57//!   - type_ref <- method Fixture::parse (tests/Fixture.cpp)
58//!   - type_ref <- method Fixture::tryParse (tests/Fixture.cpp)
59//!   - type_ref <- method Fixture::matchParseError (tests/Fixture.cpp)
60//!   - type_ref <- method Fixture::matchParseErrorPrefix (tests/Fixture.cpp)
61//!   - type_ref <- method Fixture::getMainSourceModule (tests/Fixture.cpp)
62//!   - type_ref <- method Fixture::findTypeAtPosition (tests/Fixture.cpp)
63//!   - type_ref <- method Fixture::findTypeAtPosition (tests/Fixture.cpp)
64//!   - type_ref <- method Fixture::findExpectedTypeAtPosition (tests/Fixture.cpp)
65//!   - type_ref <- method Fixture::decorateWithTypes (tests/Fixture.cpp)
66//!   - type_ref <- record Fixture (tests/Fixture.h)
67//!   - type_ref <- method FragmentAutocompleteFixtureImpl::parseHelper_ (tests/FragmentAutocomplete.test.cpp)
68//!   - type_ref <- method FragmentAutocompleteFixtureImpl::parseHelper (tests/FragmentAutocomplete.test.cpp)
69//!   - type_ref <- method FragmentAutocompleteFixtureImpl::getSource (tests/FragmentAutocomplete.test.cpp)
70//!   - type_ref <- record FragmentAutocompleteFixtureImpl (tests/FragmentAutocomplete.test.cpp)
71//!   - type_ref <- method NormalizeFixture::toNormalizedType (tests/Normalize.test.cpp)
72//!   - type_ref <- method SourceModule::SourceModule (Analysis/include/Luau/Module.h)
73//! - outgoing:
74//!   - type_ref -> method SourceModule::SourceModule (Analysis/include/Luau/Module.h)
75//!   - type_ref -> record Allocator (Ast/include/Luau/Allocator.h)
76//!   - type_ref -> record AstNameTable (Ast/include/Luau/Lexer.h)
77//!   - type_ref -> record ParseError (Ast/include/Luau/ParseResult.h)
78//!   - type_ref -> record AstStatBlock (Ast/include/Luau/Ast.h)
79//!   - type_ref -> enum Mode (Ast/include/Luau/ParseOptions.h)
80//!   - type_ref -> record HotComment (Ast/include/Luau/ParseResult.h)
81//!   - type_ref -> record Comment (Ast/include/Luau/ParseResult.h)
82//!   - translates_to -> rust_item SourceModule
83
84// Module.h:36 — hand-ported; field set matches the C++ struct.
85#[derive(Debug, Clone)]
86pub struct SourceModule {
87    pub name: luaur_config::type_aliases::module_name::ModuleName, // Module identifier or a filename
88    pub human_readable_name: alloc::string::String,
89    pub r#type: crate::enums::type_file_resolver::Type,
90    pub environment_name: Option<alloc::string::String>,
91    pub cyclic: bool,
92    pub allocator: alloc::sync::Arc<luaur_ast::records::allocator::Allocator>,
93    pub names: alloc::sync::Arc<luaur_ast::records::ast_name_table::AstNameTable>,
94    pub parse_errors: alloc::vec::Vec<luaur_ast::records::parse_error::ParseError>,
95    pub root: *mut luaur_ast::records::ast_stat_block::AstStatBlock,
96    pub mode: Option<luaur_ast::enums::mode::Mode>,
97    pub hotcomments: alloc::vec::Vec<luaur_ast::records::hot_comment::HotComment>,
98    pub comment_locations: alloc::vec::Vec<luaur_ast::records::comment::Comment>,
99}