Documentation ¶
Index ¶
- type Analyzer
- func (self *Analyzer) Analyze(parsedEntryModule pAst.Program) (modules map[string]ast.AnalyzedProgram, diagnostics []diagnostic.Diagnostic, ...)
- func (self *Analyzer) CheckAny(typ ast.Type) bool
- func (self *Analyzer) ConvertType(oldType pAst.HmsType, createErrors bool) ast.Type
- func (self *Analyzer) TypeCheck(got ast.Type, expected ast.Type, allowFunctionTypes bool) *CompabilityError
- type CompabilityError
- type HostDependencies
- type Module
- type Variable
- type VariableOriginKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func NewAnalyzer ¶
func NewAnalyzer(host HostDependencies, scopeAdditions map[string]Variable) Analyzer
func (*Analyzer) Analyze ¶
func (self *Analyzer) Analyze( parsedEntryModule pAst.Program, ) ( modules map[string]ast.AnalyzedProgram, diagnostics []diagnostic.Diagnostic, syntaxErrors []errors.Error, )
func (*Analyzer) ConvertType ¶
type CompabilityError ¶
type CompabilityError struct { GotDiagnostic diagnostic.Diagnostic ExpectedDiagnostic *diagnostic.Diagnostic }
type HostDependencies ¶
type Module ¶
type Module struct { ImportsModules []string Functions []*function Scopes []scope CurrentFunction *function LoopDepth uint // continue and break are legal if > 0 CurrentLoopIsTerminated bool // specifies whether there is at least one `break` statement inside the current loop CreateErrorIfContainsAny bool // if enabled, every expression which contains `any` will be reported as an error }
type Variable ¶
type Variable struct { Type ast.Type Span errors.Span Used bool Origin VariableOriginKind IsPub bool }
func NewBuiltinVar ¶
type VariableOriginKind ¶
type VariableOriginKind uint8
const ( NormalVariableOriginKind VariableOriginKind = iota ImportedVariableOriginKind BuiltinVariableOriginKind ParameterVariableOriginKind )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.