public override void PreWrite(OpType operation) { switch (stateType) { case CtorStateType.Initial: switch (operation) { case OpType.CtorArgStart: NewState(new CtorArgsState(), false); stateType = CtorStateType.Initializer; needComma = false; break; default: InvalidState(operation); break; } break; case CtorStateType.Initializer: switch (operation) { case OpType.CtorEnd: ReturnToPrevious(operation, false); break; case OpType.ObjStart: base.PreWrite(operation); stateType = CtorStateType.Done; break; case OpType.OpCast: base.PreWrite(operation); break; default: InvalidState(operation); break; } break; case CtorStateType.Done: switch (operation) { case OpType.CtorEnd: ReturnToPrevious(operation, false); break; default: InvalidState(operation); break; } break; } }
public override void PreWrite(OpType operation) { switch (stateType) { case CtorStateType.Initial: switch (operation) { case OpType.CtorArgStart: NewState(new CtorArgsState(), false); stateType = CtorStateType.Initializer; needComma = false; break; default: InvalidState(operation); break; } break; case CtorStateType.Initializer: switch (operation) { case OpType.CtorEnd: ReturnToPrevious(operation, false); break; case OpType.ObjStart: base.PreWrite(operation); stateType = CtorStateType.Done; break; case OpType.OpCast: base.PreWrite(operation); break; default: InvalidState(operation); break; } break; case CtorStateType.Done: switch (operation) { case OpType.CtorEnd: ReturnToPrevious(operation, false); break; default: InvalidState(operation); break; } break; } }