#include "Node.h"

//  oop	mCode;

ExternNode::ExternNode(oop code)
{
  mCode= code;
}

oop ExternNode::withCode(oop code)
{
  return new ExternNode(code);
}

oop ExternNode::encode(oop compiler)
{
  mLocation= compiler->pushStack();
  return this;
}

oop ExternNode::gen(oop unit)
{
  unit->outputStream()->format("  %s\n  ; _%d= 0;\n", mCode->cString(), mLocation);
  return this;
}

oop ExternNode::printOn(oop stream)
{
  return stream
    ->format("Extern(")
    ->print(mCode)
    ->format(")");
}
