| 2462 | } |
| 2463 | |
| 2464 | type SourceFile struct { |
| 2465 | NodeBase |
| 2466 | DeclarationBase |
| 2467 | LocalsContainerBase |
| 2468 | CompositeBase |
| 2469 | |
| 2470 | // Fields set by NewSourceFile |
| 2471 | fileName string // For debugging convenience |
| 2472 | parseOptions SourceFileParseOptions |
| 2473 | text string |
| 2474 | Statements *NodeList // NodeList[*Statement] |
| 2475 | EndOfFileToken *TokenNode // TokenNode[*EndOfFileToken] |
| 2476 | |
| 2477 | // Fields for lazily-computed data owned by packages outside ast. |
| 2478 | dataMu sync.Mutex |
| 2479 | data map[sourceFileDataKey]any |
| 2480 | |
| 2481 | // Fields set by parser |
| 2482 | diagnostics []*Diagnostic |
| 2483 | jsDiagnostics []*Diagnostic |
| 2484 | jsdocDiagnostics []*Diagnostic |
| 2485 | LanguageVariant core.LanguageVariant |
| 2486 | ScriptKind core.ScriptKind |
| 2487 | IsDeclarationFile bool |
| 2488 | ContainsNonASCII bool |
| 2489 | UsesUriStyleNodeCoreModules core.Tristate |
| 2490 | Identifiers map[string]string |
| 2491 | IdentifierCount int |
| 2492 | imports []*LiteralLikeNode // []LiteralLikeNode |
| 2493 | ModuleAugmentations []*ModuleName // []ModuleName |
| 2494 | AmbientModuleNames []string |
| 2495 | CommentDirectives []CommentDirective |
| 2496 | jsdocCache map[*Node][]*Node |
| 2497 | jsdocMu sync.RWMutex |
| 2498 | hasLazyJSDoc bool |
| 2499 | ReparsedClones []*Node |
| 2500 | Pragmas []Pragma |
| 2501 | ReferencedFiles []*FileReference |
| 2502 | TypeReferenceDirectives []*FileReference |
| 2503 | LibReferenceDirectives []*FileReference |
| 2504 | CheckJsDirective *CheckJsDirective |
| 2505 | NodeCount int |
| 2506 | TextCount int |
| 2507 | CommonJSModuleIndicator *Node |
| 2508 | // If this is the SourceFile itself, then this module was "forced" |
| 2509 | // to be an external module (previously "true"). |
| 2510 | ExternalModuleIndicator *Node |
| 2511 | |
| 2512 | // Fields set by binder |
| 2513 | |
| 2514 | isBound atomic.Bool |
| 2515 | bindOnce sync.Once |
| 2516 | bindDiagnostics []*Diagnostic |
| 2517 | BindSuggestionDiagnostics []*Diagnostic |
| 2518 | EndFlowNode *FlowNode |
| 2519 | SymbolCount int |
| 2520 | ClassifiableNames collections.Set[string] |
| 2521 | PatternAmbientModules []*PatternAmbientModule |
nothing calls this directly
no outgoing calls
no test coverage detected