Appearance
| 1 | namespace Compiler is | |
| 2 | use IO.Std; | |
| 3 | ||
| 4 | // The effective compile-depth flags (want_compile_up_to_expressions / | |
| 5 | // want_compile_expressions) are seeded at parse time from the command- | |
| 6 | // line request held in GLOBAL_BUILD_FLAGS; the analyser overrides them | |
| 7 | // per file as the active document changes. | |
| 8 | class SOURCE_FILE( | |
| 9 | want_compile_up_to_expressions: bool public, | |
| 10 | want_compile_expressions: bool public, | |
| 11 | file_name: string, | |
| 12 | definition: Syntax.Trees.Definitions.Definition | |
| 13 | ) is | |
| 14 | // Most recent pass run on this file | |
| 15 | compiled_through: Pass? public; | |
| 16 | ||
| 17 | // Comments and blank-line markers collected by the tokenizer | |
| 18 | trivia: Collections.Iterable[Lexical.TRIVIA]? public; | |
| 19 | ||
| 20 | // Signature built from the file's declaration syntax tree nodes | |
| 21 | interface_signature: string? public; | |
| 22 | ||
| 23 | // Full source text this file's tree was parsed from. Retained by | |
| 24 | // analysis mode (null in batch builds and for internal library | |
| 25 | // files): the incremental interface reconcile compares old and | |
| 26 | // new body spans textually to decide whether a replaced member's | |
| 27 | // derived facts survive the edit. | |
| 28 | source_text: string? public; | |
| 29 | ||
| 30 | // The store-free facts derived from this file's function bodies, | |
| 31 | // reused by the debounced compile's store-free refresh so only | |
| 32 | // files whose bodies or bindings changed are re-walked. Null | |
| 33 | // means stale: the tree was reparsed or spliced, or the file's | |
| 34 | // expressions were recompiled against changed symbols. | |
| 35 | store_free_facts: Collections.MutableMap[Semantic.Symbols.Function, Syntax.Process.STORE_FREE_FACTS]? public; | |
| 36 | ||
| 37 | // Source locations of contextual-keyword modifiers (`init`, `open`) | |
| 38 | // captured post-parse before `rewrite-syntax-trees` consumes them. | |
| 39 | // Read by the analysis-mode semantic-tokens handler to overlay | |
| 40 | // `keyword` tokens the TextMate grammar can't safely classify. | |
| 41 | contextual_modifier_locations: Collections.Iterable[Source.LOCATION]? public; | |
| 42 | ||
| 43 | to_string() -> string => | |
| 44 | file_name; | |
| 45 | si | |
| 46 | si |