예제 #1
0
// SetterSource returns the generated code for the setter for this member.
func (gm generatingMember) SetterSource() esbuilder.SourceBuilder {
	setterNode, _ := gm.SRGMember.Setter()
	setterBodyNode, _ := setterNode.Body()
	setterBody := propertyBodyInfo{gm.Member, setterBodyNode, []string{"val"}, gm.Generator}
	return statemachine.GenerateFunctionSource(setterBody, gm.Generator.scopegraph, gm.Generator.positionMapper)
}
예제 #2
0
// FunctionSource returns the generated code for the implementation for this member.
func (gm generatingMember) FunctionSource() esbuilder.SourceBuilder {
	return statemachine.GenerateFunctionSource(gm, gm.Generator.scopegraph, gm.Generator.positionMapper)
}