1
0
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:
Calvin Rose
2019-08-29 19:56:04 -05:00
parent 8bc8709d0e
commit 54a04b5894
4 changed files with 53 additions and 25 deletions

View File

@@ -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)