From e32b92eb892d16e6d5c2047c8b881ba2fd015bce Mon Sep 17 00:00:00 2001 From: Lawrence Bethlenfalvy Date: Tue, 23 Aug 2022 14:58:14 +0200 Subject: [PATCH] Testcase for explicit exports Also extended conslist testcase with multi-token list items --- examples/rule_demo/main.orc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/rule_demo/main.orc b/examples/rule_demo/main.orc index 2c2acd5..e72acbe 100644 --- a/examples/rule_demo/main.orc +++ b/examples/rule_demo/main.orc @@ -1,12 +1,18 @@ -export main := [foo, bar, baz, quz] +export ::(main, foo) + +main := [foo, bar, baz, quz] + +foo := steamed hams [...$data] := (cons_start ...$data cons_carriage(none)) [] := none -, $item cons_carriage($tail) := cons_carriage( - (some (cons $item $tail)) +...$prefix:1 , ...$item cons_carriage( + $tail +) := ...$prefix cons_carriage( + (some (cons (...$item) $tail)) ) -cons_start $item cons_carriage($tail) := some (cons $item $tail) +cons_start ...$item cons_carriage($tail) := some (cons (...$item) $tail)