File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,26 @@ BoolValue: class extends Value {
26
26
isTrue : func -> Bool { value }
27
27
}
28
28
29
- ListValue : class < T > extends Value {
30
- list : List <T >
29
+ ListValue : class extends Value {
30
+ list : List <Value >
31
31
32
32
init : func (= list ) {}
33
33
34
34
type : func -> String { "List" }
35
35
toString : func -> String { "List size=%d" format (list size ()) }
36
36
37
- list : func -> List < T> { list }
37
+ list : func -> List < Value> { list }
38
+ }
39
+
40
+ ContextValue : class extends Value {
41
+ context : Context
42
+
43
+ init : func (= context ) {}
44
+
45
+ type : func -> String { "Context" }
46
+ toString : func -> String { "Context" }
47
+
48
+ context : func -> Context { context }
38
49
}
39
50
40
51
Context : abstract class {
@@ -49,8 +60,8 @@ Context: abstract class {
49
60
add (name, BoolValue new (value))
50
61
}
51
62
52
- addList : func < T > (name : String , value : List < T > ) {
53
- add (name, ListValue< T > new (value))
63
+ addList : func (name : String , value : List < Value > ) {
64
+ add (name, ListValue new (value))
54
65
}
55
66
}
56
67
Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ SectionNode: class extends TNode {
56
56
}
57
57
58
58
if (variable type () == "List" ) {
59
+ for (item : Value in (variable as ListValue ) list ()) {
60
+ // TODO: check the type here to be sure its context, if not perform loop w/ single item context
61
+ Renderer new (this firstChild, (item as ContextValue ) context ()) render (out)
62
+ }
59
63
}
60
64
else if (variable type () == "Bool" ) {
61
65
if ((variable as BoolValue ) isTrue ()) {
You can’t perform that action at this time.
0 commit comments