Class NamespaceConstructorCompiler

    • Constructor Detail

      • NamespaceConstructorCompiler

        public NamespaceConstructorCompiler()
    • Method Detail

      • isNamedNodeKind

        protected boolean isNamedNodeKind()
        Ask whether this instruction generates a kind of node that is named
        isNamedNodeKind in class SimpleNodeConstructorCompiler
        true if the instruction generates a kind of node that is named
      • compileNodeName

        protected void compileNodeName​(CompilerService compiler,
                                       Expression expression)
                                throws CannotCompileException
        Compile code to generate the node name (if any) and leave it on the top of the stack. For node kinds that are always unnamed (such as comments), the stack is not changed. For node kinds that may be named or unnamed (namespace nodes), an entry is always added to the stack, which will be "" if the particular node has no name.
        compileNodeName in class SimpleNodeConstructorCompiler
        compiler - the compiler service
        expression - the expression to be compiled
        CannotCompileException - if the expression cannot be compiled to bytecode
      • pushNode

        protected void pushNode​(CompilerService compiler,
                                Expression expression)
        Generate code to write the node to the current receiver. On entry the stack holds the current receiver, the node name (for named node kinds only) and the content (for all nodes), as a UnicodeString
        Specified by:
        pushNode in class SimpleNodeConstructorCompiler
        compiler - the bytecode compiler
        expression - the expression to be compiled