Appearance
| 1 | namespace IR.Values is | |
| 2 | use Semantic.Types.Type; | |
| 3 | ||
| 4 | class ENTER_FILE: Value is | |
| 5 | path: string; | |
| 6 | ||
| 7 | init( | |
| 8 | path: string | |
| 9 | ) is | |
| 10 | super.init(); | |
| 11 | ||
| 12 | self.path = path; | |
| 13 | si | |
| 14 | ||
| 15 | gen(context: IR.CONTEXT) is | |
| 16 | context.enter_file(path, false); | |
| 17 | si | |
| 18 | ||
| 19 | to_string() -> string => | |
| 20 | "enter-file:({path})"; | |
| 21 | si | |
| 22 | ||
| 23 | class LEAVE_FILE: Value is | |
| 24 | path: string; | |
| 25 | ||
| 26 | init( | |
| 27 | path: string | |
| 28 | ) is | |
| 29 | super.init(); | |
| 30 | ||
| 31 | self.path = path; | |
| 32 | si | |
| 33 | ||
| 34 | gen(context: IR.CONTEXT) is | |
| 35 | context.leave_file(path); | |
| 36 | si | |
| 37 | ||
| 38 | to_string() -> string => | |
| 39 | "exit-file"; | |
| 40 | si | |
| 41 | si |