// : word-name body ; private int ColonAction() { _interpreter.BeginNewWordCompilation(); _interpreter.WordBeingDefined = new NonPrimitiveWord(_interpreter, _interpreter.ParseWord()); return(1); }
// :NONAME body ; private int NonameAction() { _interpreter.BeginNewWordCompilation(); _interpreter.WordBeingDefined = new NonameWord(_interpreter); return(1); }
// FCONSTANT word-name // (F: f -- ) private int FConstantAction() { _interpreter.FStackExpect(1); _interpreter.BeginNewWordCompilation(); _interpreter.AddWord(new FloatingPointConstantWord(_interpreter, _interpreter.ParseWord(), _interpreter.FPop())); _interpreter.EndNewWordCompilation(); return(1); }
// 2CONSTANT word-name // (n1 n2 -- ) private int TwoConstantAction() { _interpreter.StackExpect(2); _interpreter.BeginNewWordCompilation(); var n2 = _interpreter.Pop(); _interpreter.AddWord(new DoubleCellConstantWord(_interpreter, _interpreter.ParseWord(), _interpreter.Pop(), n2)); _interpreter.EndNewWordCompilation(); return(1); }
// OVARIABLE word-name // ( -- ) private int VariableCompilationAction() { _interpreter.BeginNewWordCompilation(); _interpreter.AddWord(new ConstantWord(_interpreter, _interpreter.ParseWord(), _interpreter.State.ObjectHeap.Alloc(1))); _interpreter.EndNewWordCompilation(); return(1); }