summaryrefslogtreecommitdiffstats
path: root/yql/essentials/parser/lexer_common/hints.cpp
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-06-20 16:21:56 +0300
committervvvv <[email protected]>2025-06-20 17:10:34 +0300
commite1efda2594290917a9cbef824f5ca242f62a845c (patch)
treeb26dace4214c08ac48206dd1313967d0f9a8ea31 /yql/essentials/parser/lexer_common/hints.cpp
parent935e53d2a9ee4b43cc0548ba836b23c003c8078e (diff)
YQL-20086 parser (w/o pg)
commit_hash:f4bddb30981abde1a951149fff272d86a22dd726
Diffstat (limited to 'yql/essentials/parser/lexer_common/hints.cpp')
-rw-r--r--yql/essentials/parser/lexer_common/hints.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/yql/essentials/parser/lexer_common/hints.cpp b/yql/essentials/parser/lexer_common/hints.cpp
index 878062a50bc..275ca165e92 100644
--- a/yql/essentials/parser/lexer_common/hints.cpp
+++ b/yql/essentials/parser/lexer_common/hints.cpp
@@ -32,13 +32,13 @@ namespace {
class TTokenProcessor {
public:
TTokenProcessor(const TString& queryFile, TSQLHints& hints, bool utf8Aware)
- : QueryFile(queryFile)
- , Hints(hints)
- , Utf8Aware(utf8Aware)
+ : QueryFile_(queryFile)
+ , Hints_(hints)
+ , Utf8Aware_(utf8Aware)
{}
TPosition ExtractPosition(const TParsedToken& token) const {
- return TPosition(token.LinePos + 1, token.Line, QueryFile);
+ return TPosition(token.LinePos + 1, token.Line, QueryFile_);
}
void ProcessToken(TParsedToken&& token) {
@@ -46,32 +46,32 @@ public:
return;
}
auto pos = ExtractPosition(token);
- YQL_ENSURE(!PrevNonCommentPos.Defined() || *PrevNonCommentPos < pos, "Tokens positions should increase monotonically");
+ YQL_ENSURE(!PrevNonCommentPos_.Defined() || *PrevNonCommentPos_ < pos, "Tokens positions should increase monotonically");
if (token.Name == "WS") {
return;
}
if (token.Name != "COMMENT") {
- PrevNonCommentPos = pos;
+ PrevNonCommentPos_ = pos;
return;
}
- if (!PrevNonCommentPos) {
+ if (!PrevNonCommentPos_) {
// skip leading comments
return;
}
- TVector<TSQLHint> currentHints = NDetail::ParseSqlHints(pos, token.Content, Utf8Aware);
+ TVector<TSQLHint> currentHints = NDetail::ParseSqlHints(pos, token.Content, Utf8Aware_);
if (currentHints.empty()) {
// no hints here
return;
}
- auto& target = Hints[*PrevNonCommentPos];
+ auto& target = Hints_[*PrevNonCommentPos_];
target.insert(target.end(), currentHints.begin(), currentHints.end());
}
private:
- TMaybe<TPosition> PrevNonCommentPos;
- const TString QueryFile;
- TSQLHints& Hints;
- const bool Utf8Aware;
+ TMaybe<TPosition> PrevNonCommentPos_;
+ const TString QueryFile_;
+ TSQLHints& Hints_;
+ const bool Utf8Aware_;
};
}