package org.ojlang.runtime;

import lombok.Getter;
import lombok.experimental.Accessors;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.ojlang.models.contracts.SystemWord;
import org.ojlang.models.syswords.Interpreter;

import java.io.Serializable;

/**
 * Registry of Oj system words.
 *
 * @author Bahman Movaqar [Bahman AT BahmanM.com]
 */
public class SystemWordsRegistry implements Serializable {

  final static private long serialVersionUID = 4672296437456620599L;

  @Accessors(fluent=true) @Getter
  final private static FastList<SystemWord> words = FastList.newListWith(
    new Interpreter()
  );

  static public int size() {
    return words.size();
  }

}

@@ -234,16 +234,102 @@
 rpreter;
+%0Aimport org.ojlang.models.syswords.io.Puts;%0Aimport org.ojlang.models.syswords.sys.Bye;
 %0A%0Aimport
@@ -704,16 +704,47 @@
 preter()
+,%0A    new Puts(),%0A    new Bye()
 %0A  );%0A%0A 

add PUTS and BYE to registry