Current returns the expression whose DSL is currently being executed. As a special case Current returns Top when the execution stack is empty.
()
| 87 | // Current returns the expression whose DSL is currently being executed. |
| 88 | // As a special case Current returns Top when the execution stack is empty. |
| 89 | func Current() Expression { |
| 90 | current := Context.Stack.Current() |
| 91 | if current == nil { |
| 92 | return Top |
| 93 | } |
| 94 | return current |
| 95 | } |
| 96 | |
| 97 | // ReportError records a DSL error for reporting post DSL execution. It accepts |
| 98 | // a format and values a la fmt.Printf. |
no test coverage detected