Example #1
0
// startParse initializes the parser, using the lexer.
func (t *Tree) startParse(funcs []map[string]interface{}, lex *lexer, treeSet map[string]*Tree) {
	t.Root = nil
	t.lex = lex
	t.vars = []string{"$"}
	t.funcs = funcs
	t.treeSet = treeSet
	t.topScope = ast.NewScope(nil)
}
Example #2
0
//Scoping Support
func (t *Tree) openScope() {
	t.topScope = ast.NewScope(t.topScope)
}