| 764 | } |
| 765 | |
| 766 | func (d *decoder) global(globalID uint64) (out *semantic.Global) { |
| 767 | d.build(d.content.Instances.Global, &d.inst.Global, globalID, &out, |
| 768 | func(p *Global, s *semantic.Global) { |
| 769 | s.AST = d.astField(p.Ast) |
| 770 | s.Annotations = d.annotations(p.Annotations) |
| 771 | s.Named = semantic.Named(d.str(p.Name)) |
| 772 | s.Type = d.ty(p.Type) |
| 773 | s.Default = d.expr(p.Default) |
| 774 | if owner := d.node(p.Owner); owner != nil { |
| 775 | semantic.Add(owner.(semantic.Owner), s) |
| 776 | } |
| 777 | }) |
| 778 | return |
| 779 | } |
| 780 | |
| 781 | func (d *decoder) ignore(ignoreID uint64) (out *semantic.Ignore) { |
| 782 | d.build(d.content.Instances.Ignore, &d.inst.Ignore, ignoreID, &out, |