File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -76,5 +76,14 @@ Context: class {
76
76
}
77
77
78
78
resolve : func (expression : String ) -> Value {
79
+ offset := expression indexOf (' ' )
80
+
81
+ // If just a simple root hash access, return value quickly
82
+ if (offset == - 1 ) {
83
+ return root get (expression)
84
+ }
85
+
86
+ // TODO: resolve chained accesses here
87
+ return null
79
88
}
80
89
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ VariableNode: class extends TNode {
33
33
init : func (= variableName ) {}
34
34
35
35
render : func (context : Context , out : Writer ) {
36
- variable := context get (variableName)
36
+ variable := context resolve (variableName)
37
37
if (! variable) {
38
38
Exception new ("Variable '%s' not found in context!" format (variableName)) throw ()
39
39
}
@@ -50,7 +50,7 @@ SectionNode: class extends TNode {
50
50
init : func (= variableName ) {}
51
51
52
52
render : func (context : Context , out : Writer ) {
53
- variable := context get (variableName)
53
+ variable := context resolve (variableName)
54
54
if (! variable) {
55
55
Exception new ("Variable '%s' not found in context!" format (variableName)) throw ()
56
56
}
You can’t perform that action at this time.
0 commit comments