diff options
| author | YDBot <[email protected]> | 2025-10-29 00:52:40 +0000 |
|---|---|---|
| committer | YDBot <[email protected]> | 2025-10-29 00:52:40 +0000 |
| commit | 41eba5a90981e431dfa9bc6746eaaa0fc3b4e88e (patch) | |
| tree | d60db91d4d7ad091d575c42c350b4d5d333e9a2d /yql/essentials/sql/v1/highlight/sql_highlight.cpp | |
| parent | 7c948ab9780c4458a78d1720571b42b4664f39c9 (diff) | |
| parent | 9f88f6f3f352193c11dd54ae15fe6218ff2d0d4d (diff) | |
Sync branches 251029-0051
Diffstat (limited to 'yql/essentials/sql/v1/highlight/sql_highlight.cpp')
| -rw-r--r-- | yql/essentials/sql/v1/highlight/sql_highlight.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/yql/essentials/sql/v1/highlight/sql_highlight.cpp b/yql/essentials/sql/v1/highlight/sql_highlight.cpp index 9ad8c6b383b..026e1dbd20e 100644 --- a/yql/essentials/sql/v1/highlight/sql_highlight.cpp +++ b/yql/essentials/sql/v1/highlight/sql_highlight.cpp @@ -179,14 +179,15 @@ template <> TUnit MakeUnit<EUnitKind::StringLiteral>(Syntax& s) { return { .Kind = EUnitKind::StringLiteral, + .RangePatterns = { + {R"(')", R"(')", R"re(\\.)re"}, + {R"(")", R"(")", R"re(\\.)re"}, + {R"(@@)", R"(@@)", R"re(\@\@\@\@)re"}, + }, .Patterns = {{s.Get("STRING_VALUE")}}, .PatternsANSI = TVector<TRegexPattern>{ TRegexPattern{s.Get("STRING_VALUE", /* ansi = */ true)}, }, - .RangePattern = TRangePattern{ - .Begin = R"(@@)", - .End = R"(@@)", - }, .IsPlain = false, }; } @@ -195,12 +196,9 @@ template <> TUnit MakeUnit<EUnitKind::Comment>(Syntax& s) { return { .Kind = EUnitKind::Comment, + .RangePatterns = {{R"(/*)", R"(*/)"}}, .Patterns = {{s.Get("COMMENT")}}, .PatternsANSI = Nothing(), - .RangePattern = TRangePattern{ - .Begin = R"(/*)", - .End = R"(*/)", - }, .IsPlain = false, }; } |
