mirror of
https://github.com/janet-lang/janet
synced 2025-12-02 14:48:10 +00:00
Fix some more recursion issues with pegs.
A keyword reference only counts as visited if we have it as cached in the memoized->table, and we know it was originally referenced from the same grammar table. If these two conditions are true, then compilation must work correctly. Also add janet_table_get_ex.
This commit is contained in:
@@ -431,4 +431,12 @@
|
||||
(check-match redef-a "abcabc" false)
|
||||
(check-match redef-a "defdef" false)
|
||||
|
||||
(def redef-b
|
||||
~{:pork {:pork "beef" :main (+ -1 (* 1 :pork))}
|
||||
:main :pork})
|
||||
|
||||
(check-match redef-b "abeef" true)
|
||||
(check-match redef-b "aabeef" false)
|
||||
(check-match redef-b "aaaaaa" false)
|
||||
|
||||
(end-suite)
|
||||
|
||||
Reference in New Issue
Block a user