Package kawa.lang

Class Syntax

    • Constructor Detail

      • Syntax

        public Syntax()
      • Syntax

        public Syntax​(Object name)
    • Method Detail

      • setName

        public void setName​(Object name)
      • setName

        public void setName​(String name)
        Specified by:
        setName in interface Named
      • rewrite

        public Expression rewrite​(Object obj,
                                  Translator tr)
        Re-write an expression that is an "application" of this Syntax object.
        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
      • scanForDefinitions

        public boolean scanForDefinitions​(Pair st,
                                          ScopeExp defs,
                                          Translator tr)
        Check if a statement is a definition, for initial pass. Semi-deprecated - should convert calls to use scanForm.
        Parameters:
        st - the statement to check
        defs - where to add Declarations for found definitions
        tr - the compilation state
        Returns:
        true on success
      • print

        public void print​(Consumer out)
        Specified by:
        print in interface gnu.kawa.format.Printable