What is anything anymore

This commit is contained in:
2022-10-24 01:16:07 -04:00
parent dfa7d31163
commit befe371e4f
4 changed files with 42 additions and 5 deletions

View File

@@ -5,7 +5,15 @@ import "git.tebibyte.media/arf/arf/types"
// LookupSection looks returns the section under the give name. If the section
// does not exist, nil is returned. If a method is being searched for, the type
// name of its receiver should be passed. If not, it should just be left blank.
func (tree SyntaxTree) LookupSection (name string) (section Section) {
func (tree SyntaxTree) LookupSection (
receiver string,
name string,
) (
section Section,
) {
if receiver != "" {
name = receiver + "_" + name
}
section = tree.sections[name]
return
}