| 147 | } |
| 148 | |
| 149 | bool Parse() { |
| 150 | if (!Impl_) { |
| 151 | Impl_.Reset( |
| 152 | EnableLinePositionInfo_ |
| 153 | ? static_cast<TYsonListParserImplBase*>(new TYsonListParserImpl<NYT::NYson::IYsonConsumer, TStreamReader, true>(Reader_, Consumer_, MemoryLimit_)) |
| 154 | : static_cast<TYsonListParserImplBase*>(new TYsonListParserImpl<NYT::NYson::IYsonConsumer, TStreamReader, false>(Reader_, Consumer_, MemoryLimit_))); |
| 155 | } |
| 156 | return Impl_->Parse(); |
| 157 | } |
| 158 | |
| 159 | private: |
| 160 | NYT::NYson::IYsonConsumer* Consumer_; |