aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson_pull/event.cpp
blob: f7d5014608ba13253306da763e5666769202c458 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "event.h" 
 
#include <library/cpp/yson_pull/detail/cescape.h>
 
#include <util/stream/output.h> 
 
using namespace NYsonPull; 
 
template <>
void Out<TEvent>(IOutputStream& out, const TEvent& value) {
    out << '(' << value.Type(); 
    if (value.Type() == EEventType::Scalar) { 
        out << ' ' << value.AsScalar(); 
    } else if (value.Type() == EEventType::Key) { 
        out << ' ' << NYsonPull::NDetail::NCEscape::quote(value.AsString()); 
    } 
    out << ')'; 
}