コード例 #1
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// WithGenericType marks the scope as having the given generic type.
func (sib *scopeInfoBuilder) WithGenericType(generic typegraph.TypeReference) *scopeInfoBuilder {
	genericValue := generic.Value()
	sib.info.GenericType = &genericValue
	return sib
}
コード例 #2
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// WithStaticType marks the scope as having the given static type.
func (sib *scopeInfoBuilder) WithStaticType(static typegraph.TypeReference) *scopeInfoBuilder {
	staticValue := static.Value()
	sib.info.StaticType = &staticValue
	return sib
}
コード例 #3
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// Assignable marks the scope as being assignable with a value of the given type.
func (sib *scopeInfoBuilder) Assignable(assignable typegraph.TypeReference) *scopeInfoBuilder {
	assignableValue := assignable.Value()
	sib.info.AssignableType = &assignableValue
	return sib
}
コード例 #4
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// Resolving marks the scope as resolving a value of the given type.
func (sib *scopeInfoBuilder) Resolving(resolved typegraph.TypeReference) *scopeInfoBuilder {
	resolvedValue := resolved.Value()
	sib.info.ResolvedType = &resolvedValue
	return sib
}
コード例 #5
0
ファイル: scopeinfo.go プロジェクト: Serulian/compiler
// Returning marks the scope as returning a value of the given type.
func (sib *scopeInfoBuilder) Returning(returning typegraph.TypeReference, settlesScope bool) *scopeInfoBuilder {
	returnedValue := returning.Value()
	sib.info.ReturnedType = &returnedValue
	sib.info.IsSettlingScope = &settlesScope
	return sib
}