typeinfer

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Infer

func Infer(expr file.Expression) string

Infer attempts to infer the type expr would yield.

Infer can detect int, float, bool, rune, string, and composite literals, as well as the above wrapped in ternary expressions

If Infer returns an empty string, it could not identify the type.

func MixinParams

func MixinParams(m *file.Mixin)

MixinParams attempts to infer the type of m's params without an explicitly set type but a default expression.

When it succeeds, it stores the inferred type as file.MixinParam.InferredType.

func Scope

func Scope(s file.Scope)

Scope runs MixinParams on all mixins in the passed scope.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL