aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson
diff options
context:
space:
mode:
authorlaplab <laplab@yandex-team.ru>2022-02-10 16:47:56 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:56 +0300
commit9968a46231e337bd46eca82216b40f8eadec679c (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/yson
parentf102186b7df1a2a26c35c81eeed5ae914484bdab (diff)
downloadydb-9968a46231e337bd46eca82216b40f8eadec679c.tar.gz
Restoring authorship annotation for <laplab@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson')
-rw-r--r--library/cpp/yson/detail.h14
-rw-r--r--library/cpp/yson/lexer_detail.h8
-rw-r--r--library/cpp/yson/parser_detail.h22
-rw-r--r--library/cpp/yson/token.cpp8
4 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/yson/detail.h b/library/cpp/yson/detail.h
index b585e5dcd8..27f5e8ffff 100644
--- a/library/cpp/yson/detail.h
+++ b/library/cpp/yson/detail.h
@@ -380,9 +380,9 @@ namespace NYson {
void CheckMemoryLimit() {
if (MemoryLimit_ && Buffer_.capacity() > *MemoryLimit_) {
- ythrow TYsonException()
- << "Memory limit exceeded while parsing YSON stream: allocated "
- << Buffer_.capacity() << ", limit " << (*MemoryLimit_);
+ ythrow TYsonException()
+ << "Memory limit exceeded while parsing YSON stream: allocated "
+ << Buffer_.capacity() << ", limit " << (*MemoryLimit_);
}
}
@@ -411,7 +411,7 @@ namespace NYson {
Buffer_.push_back(ch);
result = ENumericResult::Uint64;
} else if (isalpha(ch)) {
- ythrow TYsonException() << "Unexpected '" << ch << "' in numeric literal";
+ ythrow TYsonException() << "Unexpected '" << ch << "' in numeric literal";
} else {
break;
}
@@ -531,7 +531,7 @@ namespace NYson {
i32 length = ZigZagDecode32(ulength);
if (length < 0) {
- ythrow TYsonException() << "Negative binary string literal length " << length;
+ ythrow TYsonException() << "Negative binary string literal length " << length;
}
if (TBaseStream::Begin() + length <= TBaseStream::End()) {
@@ -564,7 +564,7 @@ namespace NYson {
static TStringBuf falseString = "false";
auto throwIncorrectBoolean = [&]() {
- ythrow TYsonException() << "Incorrect boolean string " << TString(Buffer_.data(), Buffer_.size());
+ ythrow TYsonException() << "Incorrect boolean string " << TString(Buffer_.data(), Buffer_.size());
};
Buffer_.push_back(TBaseStream::template GetChar<AllowFinish>());
@@ -637,7 +637,7 @@ namespace NYson {
void SkipCharToken(char symbol) {
char ch = SkipSpaceAndGetChar();
if (ch != symbol) {
- ythrow TYsonException() << "Expected '" << symbol << "' but found '" << ch << "'";
+ ythrow TYsonException() << "Expected '" << symbol << "' but found '" << ch << "'";
}
TBaseStream::Advance(1);
diff --git a/library/cpp/yson/lexer_detail.h b/library/cpp/yson/lexer_detail.h
index de2546903e..0bba30acdd 100644
--- a/library/cpp/yson/lexer_detail.h
+++ b/library/cpp/yson/lexer_detail.h
@@ -196,7 +196,7 @@ namespace NYson {
}
} else { // None
Y_ASSERT(state == EReadStartCase::None);
- ythrow TYsonException() << "Unexpected " << ch1;
+ ythrow TYsonException() << "Unexpected " << ch1;
}
} else { // BinaryScalar = x01b
TBase::Advance(1);
@@ -243,19 +243,19 @@ namespace NYson {
try {
*token = TToken(FromString<double>(valueBuffer));
} catch (yexception&) {
- ythrow TYsonException() << "Error parsing double literal " << valueBuffer;
+ ythrow TYsonException() << "Error parsing double literal " << valueBuffer;
}
} else if (numericResult == ENumericResult::Int64) {
try {
*token = TToken(FromString<i64>(valueBuffer));
} catch (yexception&) {
- ythrow TYsonException() << "Error parsing int64 literal " << valueBuffer;
+ ythrow TYsonException() << "Error parsing int64 literal " << valueBuffer;
}
} else if (numericResult == ENumericResult::Uint64) {
try {
*token = TToken(FromString<ui64>(valueBuffer.SubStr(0, valueBuffer.size() - 1)));
} catch (yexception&) {
- ythrow TYsonException() << "Error parsing uint64 literal " << valueBuffer;
+ ythrow TYsonException() << "Error parsing uint64 literal " << valueBuffer;
}
}
}
diff --git a/library/cpp/yson/parser_detail.h b/library/cpp/yson/parser_detail.h
index ba44c92e7e..44223caf12 100644
--- a/library/cpp/yson/parser_detail.h
+++ b/library/cpp/yson/parser_detail.h
@@ -40,7 +40,7 @@ namespace NYson {
while (!(TBase::IsFinished() && TBase::IsEmpty())) {
if (TBase::template SkipSpaceAndGetChar<true>() != EndSymbol) {
- ythrow TYsonException() << "Stray '" << (*TBase::Begin()) << "' found";
+ ythrow TYsonException() << "Stray '" << (*TBase::Begin()) << "' found";
} else if (!TBase::IsEmpty()) {
TBase::Advance(1);
}
@@ -163,7 +163,7 @@ namespace NYson {
Consumer->OnDoubleScalar(TBase::template ReadNanOrInf<AllowFinish>());
}
} else {
- ythrow TYsonException() << "Unexpected '" << ch << "' while parsing node";
+ ythrow TYsonException() << "Unexpected '" << ch << "' while parsing node";
}
}
}
@@ -195,7 +195,7 @@ namespace NYson {
TBase::ReadUnquotedString(&value);
Consumer->OnKeyedItem(value);
} else {
- ythrow TYsonException() << "Unexpected '" << ch << "' while parsing key";
+ ythrow TYsonException() << "Unexpected '" << ch << "' while parsing key";
}
}
}
@@ -210,7 +210,7 @@ namespace NYson {
if (ch == KeyValueSeparatorSymbol) {
TBase::Advance(1);
} else {
- ythrow TYsonException() << "Expected '" << KeyValueSeparatorSymbol << "' but '" << ch << "' found";
+ ythrow TYsonException() << "Expected '" << KeyValueSeparatorSymbol << "' but '" << ch << "' found";
}
ParseNode<AllowFinish>();
ch = TBase::template SkipSpaceAndGetChar<AllowFinish>();
@@ -218,8 +218,8 @@ namespace NYson {
TBase::Advance(1);
ch = TBase::template SkipSpaceAndGetChar<AllowFinish>();
} else if (ch != endSymbol) {
- ythrow TYsonException() << "Expected '" << KeyedItemSeparatorSymbol
- << "' or '" << endSymbol << "' but '" << ch << "' found";
+ ythrow TYsonException() << "Expected '" << KeyedItemSeparatorSymbol
+ << "' or '" << endSymbol << "' but '" << ch << "' found";
}
}
}
@@ -246,8 +246,8 @@ namespace NYson {
TBase::Advance(1);
return true;
} else if (ch != endSymbol) {
- ythrow TYsonException() << "Expected '" << ListItemSeparatorSymbol
- << "' or '" << endSymbol << "' but '" << ch << "' found";
+ ythrow TYsonException() << "Expected '" << ListItemSeparatorSymbol
+ << "' or '" << endSymbol << "' but '" << ch << "' found";
}
return false;
}
@@ -273,7 +273,7 @@ namespace NYson {
value = FromString<double>(valueBuffer);
} catch (yexception& e) {
// This exception is wrapped in parser.
- ythrow TYsonException() << "Failed to parse double literal '" << valueBuffer << "'" << e;
+ ythrow TYsonException() << "Failed to parse double literal '" << valueBuffer << "'" << e;
}
Consumer->OnDoubleScalar(value);
} else if (numericResult == ENumericResult::Int64) {
@@ -282,7 +282,7 @@ namespace NYson {
value = FromString<i64>(valueBuffer);
} catch (yexception& e) {
// This exception is wrapped in parser.
- ythrow TYsonException() << "Failed to parse int64 literal '" << valueBuffer << "'" << e;
+ ythrow TYsonException() << "Failed to parse int64 literal '" << valueBuffer << "'" << e;
}
Consumer->OnInt64Scalar(value);
} else if (numericResult == ENumericResult::Uint64) {
@@ -291,7 +291,7 @@ namespace NYson {
value = FromString<ui64>(valueBuffer.SubStr(0, valueBuffer.size() - 1));
} catch (yexception& e) {
// This exception is wrapped in parser.
- ythrow TYsonException() << "Failed to parse uint64 literal '" << valueBuffer << "'" << e;
+ ythrow TYsonException() << "Failed to parse uint64 literal '" << valueBuffer << "'" << e;
}
Consumer->OnUint64Scalar(value);
}
diff --git a/library/cpp/yson/token.cpp b/library/cpp/yson/token.cpp
index 7778ac887f..c8584c8c2e 100644
--- a/library/cpp/yson/token.cpp
+++ b/library/cpp/yson/token.cpp
@@ -188,11 +188,11 @@ namespace NYson {
void TToken::CheckType(ETokenType expectedType) const {
if (Type_ != expectedType) {
if (Type_ == ETokenType::EndOfStream) {
- ythrow TYsonException() << "Unexpected end of stream (ExpectedType: " << TokenTypeToString(expectedType) << ")";
+ ythrow TYsonException() << "Unexpected end of stream (ExpectedType: " << TokenTypeToString(expectedType) << ")";
} else {
- ythrow TYsonException() << "Unexpected token (Token: '" << ToString(*this)
- << "', Type: " << TokenTypeToString(Type_)
- << ", ExpectedType: " << TokenTypeToString(expectedType) << ")";
+ ythrow TYsonException() << "Unexpected token (Token: '" << ToString(*this)
+ << "', Type: " << TokenTypeToString(Type_)
+ << ", ExpectedType: " << TokenTypeToString(expectedType) << ")";
}
}
}