Package kawa.standard

Class let

All Implemented Interfaces:
gnu.kawa.format.Printable, Named

public class let extends Syntax
The Syntax transformer that re-writes the Scheme "let" primitive. This only handles standard "unnamed" let. The let macro in ../lib/let.scm handles named let as well.
  • Field Details

    • let

      public static final let let
    • settingProcedures

      protected boolean settingProcedures
      Used for constructs such as FLET, where we intend to set a function binding rather than an ordinary binding.
  • Constructor Details

    • let

      public let(String name, boolean settingProcedures)
  • Method Details

    • rewrite

      public Expression rewrite(Object obj, Translator tr)
      Description copied from class: Syntax
      Re-write an expression that is an "application" of this Syntax object.
      Overrides:
      rewrite in class Syntax
      Parameters:
      obj - the arguments to this "application" (i.e. the cdr of the macro/builtin invocation)
      tr - the Translator that provides context
      Returns:
      the re-written expression
    • maybeSetProcedure

      protected void maybeSetProcedure(Declaration decl)
      Set the procedure flag of a declaration if binding a function property. This is used for FLET .vs. LET distinction, where settingProcedures is true for FLET, and false for LET.
      Parameters:
      decl - The declaration to possibly set the PROCEDURE flag.