diff --git a/node.go b/node.go index ee8ca85..1e43391 100644 --- a/node.go +++ b/node.go @@ -107,6 +107,15 @@ func convert(n_ node.Node) (string, error) { memberVars := []string{} memberFuncs := []string{} + if n.Extends != nil { + parentName, err := resolveName(n.Extends.ClassName) + if err != nil { + return "", parseErr{n, err} + } + + memberVars = append(memberVars, parentName+" // parent") + } + // Walk all child nodes of the class for _, s_ := range n.Stmts { switch s := s_.(type) {