Module jamal.api

Interface Stackable

  • All Superinterfaces:
    Macro

    public interface Stackable
    extends Macro
    The macros that need the push() and pop() call-backs when the macro level is increasing / decreasing should implement this interface.

    Macro level gets deeper when macros are evaluated in a macro enclosure or when a macro itself calls the macro register push() method. For example the macro include calls MacroRegister.push(Marker) before starting to process the content of a file and calls MacroRegister.pop(Marker) when it finished.

    Macro level gets back to the previous state when the MacroRegister.pop(Marker) method is invoked. This happens when the macro import finished processing a file or when the macro evaluation finished the macro evaluation inside a macro.

    When a macro starts with the # character then the content of the macro is processed resolving macro references before processing the macro itself. This process is executed one level deeper than the current level. The Processor.process(Input) calls MacroRegister.push(Marker) before starting to process the content of the macro body and calls MacroRegister.pop(Marker) when it has finished.

    • Method Detail

      • push

        void push()
      • pop

        void pop()