Commit 6df982b4 authored by Thierry Martinez's avatar Thierry Martinez

Recursive lists

parent 7a1000e0
......@@ -435,6 +435,17 @@ item(Options) :-
;
Parent0 = Parent
),
(
var(Kind)
->
true
;
list(Kind)
->
member(Kind0, Kind)
;
Kind0 = Kind
),
(
var(Key)
->
......@@ -447,7 +458,7 @@ item(Options) :-
;
key(Key, Id)
),
item(Id, Parent0, Kind, Item).
item(Id, Parent0, Kind0, Item).
find_item(Options) :-
......@@ -522,7 +533,7 @@ list_ids(Options, Ids) :-
Recursive = yes
->
SubIndent is Indent + 1,
list_items([indent: SubIndent, recursive, parent: Id])
list_items([indent: SubIndent, recursive, parent: Id | Options])
;
true
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment