public void EnterList(OfcListType type, int capacity) { if (_compress != null) { return; //throw new NotSupportedException(); } _compress = _algorithm.Compress(null, _config, _output, (int)type, capacity); }
private void ParseList(OfcListType type, int amount) { OfcToken c; _hook.EnterList(type, amount); var done = false; var d = false; do { if (!Needs(1)) { throw new ParserException(); } c = _buffer[_position]; if (c.Type == OfcTokenType.PARENTHESE_CLOSE) { d = true; _hook.LeaveList(); Skip(1); done = true; break; } switch (type) { case OfcListType.Scalar: ParseScalar(); break; case OfcListType.Vector: ParseVector(); break; case OfcListType.Tensor: ParseTensor(); break; default: throw new Exception("Not supported list type: " + type); } } while (!(_eos && _length == 0)); if (!d) { _hook.LeaveList(); } if (!done) { throw new ParserException(); } }
public void EnterList(OfcListType type, int capacity) { switch (type) { case OfcListType.Scalar: Console.WriteLine($" List<scalar> {capacity} ("); break; case OfcListType.Vector: Console.WriteLine($" List<vector> {capacity} ("); break; case OfcListType.Tensor: Console.WriteLine($" List<tensor> {capacity} ("); break; case OfcListType.Anonymous: Console.WriteLine($" {capacity} ("); break; } }
public abstract void EnterList(OfcListType type, int capacity);
public void EnterList(OfcListType type, int capacity) { }