Vixen
02b45cc4
csharp
public abstract class Binder

Expression-aware conversion classification and insertion.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (8)

  • public Binder? Next

    The enclosing scope, or null for the global binder.

  • public virtual BindingContext Context
  • public Compilation Compilation
  • public DiagnosticBag Diagnostics
  • public virtual NamedTypeSymbol? ContainingType

    The type whose body we are inside, if any — what self means.

  • public virtual Symbol? ContainingMember

    The member being bound (method, field initializer, accessor).

  • public virtual TypeSymbol? ReturnType

    The return type return statements must satisfy.

  • public virtual bool IsInLoop

    True inside a loop body, where break/continue are legal.

Methods (10)

  • protected Binder(Binder? next)
  • public IReadOnlyList<Symbol> Lookup(string name)

    Symbols named , from the innermost scope that has any. Outer scopes are shadowed, not merged.

  • public TypeSymbol? LookupType(string name, int arity)

    The first type named with this generic arity. Unlike Lookup this keeps searching outward past scopes whose match is not a type, so a local named float cannot hide the type.

  • public NamespaceSymbol? LookupNamespace(string name)

    The first namespace named in scope.

  • public static IReadOnlyList<Symbol> LookupMembers(TypeSymbol type, string name)

    Members named reachable on , searching its bases and protocols. The first type in the chain that declares the name wins.

  • public BoundExpression BindExpression(ExpressionSyntax syntax)

    Binds an expression. The result may denote a namespace, a type or a method group as well as a value — use BindValue where only a value will do.

  • public BoundExpression BindValue(ExpressionSyntax syntax)

    Binds an expression that must produce a value.

  • public BoundStatement BindStatement(StatementSyntax syntax)
  • public BoundBlockStatement BindBlock(BlockSyntax syntax)

    Binds a block in its own scope.

  • public TypeSymbol BindType(TypeSyntax? syntax)

    Resolves a type annotation. Failures report once and yield ErrorTypeSymbol so callers need no null checks.

Used by (17)

  • BlockBinderVixen.Raven
  • CompilationVixen.Raven
  • ConstraintResolutionVixen.Raven
  • ContextBinderVixen.Raven
  • GlobalBinderVixen.Raven
  • ImportBinderVixen.Raven
  • MemberBinderVixen.Raven
  • NamedTypeBinderVixen.Raven
  • SemanticModelVixen.Raven
  • SourceEnumMemberSymbolVixen.Raven
  • SourceFieldSymbolVixen.Raven
  • SourceMethodSymbolVixen.Raven
  • SourceNamedTypeSymbolVixen.Raven
  • SourceParameterSymbolVixen.Raven
  • SourcePropertySymbolVixen.Raven
  • SourceValueParameterSymbolVixen.Raven
  • SymbolTestsVixen.Raven.Tests