aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvitya-smirnov <vitya-smirnov@yandex-team.com>2025-07-18 14:07:40 +0300
committervitya-smirnov <vitya-smirnov@yandex-team.com>2025-07-18 14:19:21 +0300
commit8c0b4c7cd8fe77bad3f8298b5536dd30737f9e40 (patch)
tree840e7d8fee31e6cdfd9b0b866613f446098db589
parent3a784b9ad30534ae99cf449757030a09c7c36082 (diff)
downloadydb-8c0b4c7cd8fe77bad3f8298b5536dd30737f9e40.tar.gz
YQL-19616: Fix BindParameterIdentifier typo
commit_hash:d95cb665e7dd63f67ee4ef7a2602f1c9ec34d26f
-rw-r--r--yql/essentials/sql/v1/highlight/sql_highlight.cpp10
-rw-r--r--yql/essentials/sql/v1/highlight/sql_highlight.h5
-rw-r--r--yql/essentials/sql/v1/highlight/sql_highlighter.cpp2
-rw-r--r--yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp2
-rw-r--r--yql/essentials/tools/yql_highlight/generate.cpp2
-rw-r--r--yql/essentials/tools/yql_highlight/generate_textmate.cpp2
-rw-r--r--yql/essentials/tools/yql_highlight/generate_vim.cpp6
-rw-r--r--yql/essentials/tools/yql_highlight/yql_highlight.cpp2
8 files changed, 17 insertions, 14 deletions
diff --git a/yql/essentials/sql/v1/highlight/sql_highlight.cpp b/yql/essentials/sql/v1/highlight/sql_highlight.cpp
index ff5b06a77ca..a95d29e5aeb 100644
--- a/yql/essentials/sql/v1/highlight/sql_highlight.cpp
+++ b/yql/essentials/sql/v1/highlight/sql_highlight.cpp
@@ -86,9 +86,9 @@ namespace NSQLHighlight {
}
template <>
- TUnit MakeUnit<EUnitKind::BindParamterIdentifier>(Syntax& s) {
+ TUnit MakeUnit<EUnitKind::BindParameterIdentifier>(Syntax& s) {
return {
- .Kind = EUnitKind::BindParamterIdentifier,
+ .Kind = EUnitKind::BindParameterIdentifier,
.Patterns = {
{s.Concat({"DOLLAR", "ID_PLAIN"})},
},
@@ -231,7 +231,7 @@ namespace NSQLHighlight {
h.Units.emplace_back(MakeUnit<EUnitKind::Keyword>(s));
h.Units.emplace_back(MakeUnit<EUnitKind::Punctuation>(s));
h.Units.emplace_back(MakeUnit<EUnitKind::QuotedIdentifier>(s));
- h.Units.emplace_back(MakeUnit<EUnitKind::BindParamterIdentifier>(s));
+ h.Units.emplace_back(MakeUnit<EUnitKind::BindParameterIdentifier>(s));
h.Units.emplace_back(MakeUnit<EUnitKind::FunctionIdentifier>(s));
h.Units.emplace_back(MakeUnit<EUnitKind::TypeIdentifier>(s));
h.Units.emplace_back(MakeUnit<EUnitKind::Identifier>(s));
@@ -256,8 +256,8 @@ void Out<NSQLHighlight::EUnitKind>(IOutputStream& out, NSQLHighlight::EUnitKind
case NSQLHighlight::EUnitKind::QuotedIdentifier:
out << "quoted-identifier";
break;
- case NSQLHighlight::EUnitKind::BindParamterIdentifier:
- out << "bind-paramter-identifier";
+ case NSQLHighlight::EUnitKind::BindParameterIdentifier:
+ out << "bind-parameter-identifier";
break;
case NSQLHighlight::EUnitKind::TypeIdentifier:
out << "type-identifier";
diff --git a/yql/essentials/sql/v1/highlight/sql_highlight.h b/yql/essentials/sql/v1/highlight/sql_highlight.h
index f6ecc375836..43c46c39d53 100644
--- a/yql/essentials/sql/v1/highlight/sql_highlight.h
+++ b/yql/essentials/sql/v1/highlight/sql_highlight.h
@@ -7,13 +7,16 @@
#include <util/generic/vector.h>
#include <util/generic/map.h>
+// TODO(vityaman): Migrate YDB to corrected version
+#define BindParamterIdentifier BindParameterIdentifier // NOLINT
+
namespace NSQLHighlight {
enum class EUnitKind {
Keyword,
Punctuation,
QuotedIdentifier,
- BindParamterIdentifier,
+ BindParameterIdentifier,
TypeIdentifier,
FunctionIdentifier,
Identifier,
diff --git a/yql/essentials/sql/v1/highlight/sql_highlighter.cpp b/yql/essentials/sql/v1/highlight/sql_highlighter.cpp
index 54513b1117f..e44695d0a28 100644
--- a/yql/essentials/sql/v1/highlight/sql_highlighter.cpp
+++ b/yql/essentials/sql/v1/highlight/sql_highlighter.cpp
@@ -19,7 +19,7 @@ namespace NSQLHighlight {
names[EUnitKind::Keyword] = "K";
names[EUnitKind::Punctuation] = "P";
names[EUnitKind::QuotedIdentifier] = "Q";
- names[EUnitKind::BindParamterIdentifier] = "B";
+ names[EUnitKind::BindParameterIdentifier] = "B";
names[EUnitKind::TypeIdentifier] = "T";
names[EUnitKind::FunctionIdentifier] = "F";
names[EUnitKind::Identifier] = "I";
diff --git a/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp b/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp
index 5fcab7937fc..86ecb1f3306 100644
--- a/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp
+++ b/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp
@@ -48,7 +48,7 @@ char ToChar(EUnitKind kind) {
return 'I';
case EUnitKind::QuotedIdentifier:
return 'Q';
- case EUnitKind::BindParamterIdentifier:
+ case EUnitKind::BindParameterIdentifier:
return 'B';
case EUnitKind::TypeIdentifier:
return 'T';
diff --git a/yql/essentials/tools/yql_highlight/generate.cpp b/yql/essentials/tools/yql_highlight/generate.cpp
index 36a2ecfdfe0..ba623cec9f6 100644
--- a/yql/essentials/tools/yql_highlight/generate.cpp
+++ b/yql/essentials/tools/yql_highlight/generate.cpp
@@ -6,7 +6,7 @@ namespace NSQLHighlight {
return (kind != EUnitKind::Comment) &&
(kind != EUnitKind::StringLiteral) &&
(kind != EUnitKind::QuotedIdentifier) &&
- (kind != EUnitKind::BindParamterIdentifier);
+ (kind != EUnitKind::BindParameterIdentifier);
}
bool IsIgnored(EUnitKind kind) {
diff --git a/yql/essentials/tools/yql_highlight/generate_textmate.cpp b/yql/essentials/tools/yql_highlight/generate_textmate.cpp
index c7da2c9212f..76677563f38 100644
--- a/yql/essentials/tools/yql_highlight/generate_textmate.cpp
+++ b/yql/essentials/tools/yql_highlight/generate_textmate.cpp
@@ -44,7 +44,7 @@ namespace NSQLHighlight {
return "keyword.operator.custom";
case EUnitKind::QuotedIdentifier:
return "string.quoted.double.custom";
- case EUnitKind::BindParamterIdentifier:
+ case EUnitKind::BindParameterIdentifier:
return "variable.other.dollar.custom";
case EUnitKind::TypeIdentifier:
return "entity.name.type";
diff --git a/yql/essentials/tools/yql_highlight/generate_vim.cpp b/yql/essentials/tools/yql_highlight/generate_vim.cpp
index 4af90c152e7..579513c3cc3 100644
--- a/yql/essentials/tools/yql_highlight/generate_vim.cpp
+++ b/yql/essentials/tools/yql_highlight/generate_vim.cpp
@@ -66,8 +66,8 @@ namespace NSQLHighlight {
return "yqlPunctuation";
case EUnitKind::QuotedIdentifier:
return "yqlQuotedIdentifier";
- case EUnitKind::BindParamterIdentifier:
- return "yqlBindParamterIdentifier";
+ case EUnitKind::BindParameterIdentifier:
+ return "yqlBindParameterIdentifier";
case EUnitKind::TypeIdentifier:
return "yqlTypeIdentifier";
case EUnitKind::FunctionIdentifier:
@@ -103,7 +103,7 @@ namespace NSQLHighlight {
return {"Operator"};
case EUnitKind::QuotedIdentifier:
return {"Special", "Underlined"};
- case EUnitKind::BindParamterIdentifier:
+ case EUnitKind::BindParameterIdentifier:
return {"Identifier"};
case EUnitKind::TypeIdentifier:
return {"Type"};
diff --git a/yql/essentials/tools/yql_highlight/yql_highlight.cpp b/yql/essentials/tools/yql_highlight/yql_highlight.cpp
index 305ef95c563..ed651881325 100644
--- a/yql/essentials/tools/yql_highlight/yql_highlight.cpp
+++ b/yql/essentials/tools/yql_highlight/yql_highlight.cpp
@@ -37,7 +37,7 @@ int RunHighlighter() {
{EUnitKind::Keyword, NColorizer::BLUE},
{EUnitKind::Punctuation, NColorizer::DARK_WHITE},
{EUnitKind::QuotedIdentifier, NColorizer::DARK_CYAN},
- {EUnitKind::BindParamterIdentifier, NColorizer::YELLOW},
+ {EUnitKind::BindParameterIdentifier, NColorizer::YELLOW},
{EUnitKind::TypeIdentifier, NColorizer::GREEN},
{EUnitKind::FunctionIdentifier, NColorizer::MAGENTA},
{EUnitKind::Identifier, NColorizer::DEFAULT},