-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REFACTOR]: Spawn Call wlk-ent -> wlk-ent-with -> node-ent -> node-en…
…t-with -> node-ext-with -> node-ext -> wlk-ext-with -> wlk-ext
- Loading branch information
Showing
6 changed files
with
161 additions
and
46 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
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
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
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
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,57 @@ | ||
node Node { | ||
has val: str; | ||
|
||
can entry1 with entry { | ||
print(f"{self.val}-4"); | ||
} | ||
|
||
###################################################### | ||
# NOT SUPPORTED YET IF IT'S DECLARED FIRST # | ||
###################################################### | ||
# | ||
# can entry2 with "Walker" entry { | ||
# print(5); | ||
# } | ||
# | ||
# can exit1 with "Walker" exit { | ||
# print(6); | ||
# } | ||
# | ||
###################################################### | ||
# -------------------------------------------------- # | ||
###################################################### | ||
|
||
|
||
can exit2 with exit { | ||
print(f"{self.val}-7"); | ||
} | ||
} | ||
walker Walker { | ||
can entry1 with entry { | ||
print(1); | ||
} | ||
|
||
can entry2 with `root entry { | ||
print(2); | ||
visit [-->]; | ||
} | ||
|
||
can entry3 with Node entry { | ||
print(f"{here.val}-3"); | ||
} | ||
|
||
can exit1 with Node exit { | ||
print(f"{here.val}-8"); | ||
} | ||
|
||
can exit2 with exit { | ||
print(9); | ||
} | ||
} | ||
with entry{ | ||
root ++> Node(val = "a"); | ||
root ++> Node(val = "b"); | ||
root ++> Node(val = "c"); | ||
|
||
Walker() spawn root; | ||
} |
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