protected SubRange ParseSuffixRange(Tokenizer tokenizer) { tokenizer.Read(DASH); var end = tokenizer.ReadLong(); return(SubRange.CreateOffsetFromEnd(end)); }
protected SubRange ParseRange(Tokenizer tokenizer) { if (tokenizer.IsNext(DASH)) { return(ParseSuffixRange(tokenizer)); } var start = tokenizer.ReadLong(); tokenizer.Read(DASH); var end = tokenizer.TryReadLong(); return(end == null ? SubRange.CreateOffsetFromStart(start) : SubRange.CreateClosedRange(start, end.Value)); }