Add parser.Tree.AddDeclaration()
This commit is contained in:
parent
08f1027834
commit
3e89953d07
@ -34,3 +34,8 @@ func (this *Tree) Parse (name string, file io.Reader) error {
|
|||||||
if err != nil { return err }
|
if err != nil { return err }
|
||||||
return parser.ParseInto(this)
|
return parser.ParseInto(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddDeclaration adds a top-level entity to the tree.
|
||||||
|
func (this *Tree) AddDeclaration (topLevel ...entity.TopLevel) {
|
||||||
|
this.Declarations = append(this.Declarations, topLevel...)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user