This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated test_language and add walker update code
- Loading branch information
1 parent
69245a9
commit cc00d19
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import:jac from bar { bar_walk } | ||
import:py from jaclang.runtimelib.machine { JacMachine } | ||
import:py os; | ||
|
||
can update_bar_walker { | ||
"Updating bar.jac with new behavior." |> print; | ||
(bar_walk_new, ) = JacMachine.get().update_walker( | ||
"bar", | ||
items={'bar_walk': None} | ||
); | ||
"Running bar_walk after update..." |> print; | ||
root spawn bar_walk_new(); | ||
print(f"bar_walk: {bar_walk_new.__dict__}"); | ||
} | ||
|
||
|
||
with entry { | ||
update_bar_walker(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters