private IOperator ParseToken(string token) { IParseResult tokenResult; _operatorTokenResultParser.TryParse(token, out tokenResult); var typedTokenResult = ( OperatorParseResult )tokenResult; var @operator = typedTokenResult.Result; return(@operator); }
public void Parse(ReadOnlySequence <byte> resultBuffer) { if (!_parser.TryParse(resultBuffer)) { return; } if (_taskSource.IsCompleted()) { // _taskSource is not ready to receive new results _results.Enqueue(_parser.ResultObject); return; } _taskSource.SetResult(_parser.ResultObject); }