Class Binder

java.lang.Object
codeanalysis.binding.Binder

public class Binder extends Object
The `Binder` class is responsible for binding expression syntax to bound expressions. It performs type checking and generates diagnostic messages for any binding errors.
Version:
1.0
Author:
Siyabend Urun
See Also:
  • Constructor Details

    • Binder

      public Binder(Map<VariableSymbol,Object> variables)
      Initializes a new instance of the Binder class with the specified variables.
      Parameters:
      variables - The variables to be used during binding process.
  • Method Details

    • bindExpression

      public BoundExpression bindExpression(ExpressionSyntax syntax)
      Binds the given expression syntax and returns the corresponding bound expression.
      Parameters:
      syntax - The expression syntax to bind.
      Returns:
      The bound expression.
    • diagnostics

      public DiagnosticBox diagnostics()
      Gets an iterator over the diagnostic messages generated during binding.
      Returns:
      An iterator over the diagnostic messages.