aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/hyperscan/src/parser/shortcut_literal.cpp
diff options
context:
space:
mode:
authorIvan Blinkov <ivan@blinkov.ru>2022-02-10 16:47:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:10 +0300
commit1aeb9a455974457866f78722ad98114bafc84e8a (patch)
treee4340eaf1668684d83a0a58c36947c5def5350ad /contrib/libs/hyperscan/src/parser/shortcut_literal.cpp
parentbd5ef432f5cfb1e18851381329d94665a4c22470 (diff)
downloadydb-1aeb9a455974457866f78722ad98114bafc84e8a.tar.gz
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/hyperscan/src/parser/shortcut_literal.cpp')
-rw-r--r--contrib/libs/hyperscan/src/parser/shortcut_literal.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/libs/hyperscan/src/parser/shortcut_literal.cpp b/contrib/libs/hyperscan/src/parser/shortcut_literal.cpp
index a5d67f30d8..3f7150c2f1 100644
--- a/contrib/libs/hyperscan/src/parser/shortcut_literal.cpp
+++ b/contrib/libs/hyperscan/src/parser/shortcut_literal.cpp
@@ -159,26 +159,26 @@ public:
ConstructLiteralVisitor::~ConstructLiteralVisitor() {}
/** \brief True if the literal expression \a expr could be added to Rose. */
-bool shortcutLiteral(NG &ng, const ParsedExpression &pe) {
- assert(pe.component);
+bool shortcutLiteral(NG &ng, const ParsedExpression &pe) {
+ assert(pe.component);
- if (!ng.cc.grey.allowLiteral) {
+ if (!ng.cc.grey.allowLiteral) {
return false;
}
- const auto &expr = pe.expr;
-
+ const auto &expr = pe.expr;
+
// XXX: don't shortcut literals with extended params (yet)
- if (expr.min_offset || expr.max_offset != MAX_OFFSET || expr.min_length ||
- expr.edit_distance || expr.hamm_distance) {
+ if (expr.min_offset || expr.max_offset != MAX_OFFSET || expr.min_length ||
+ expr.edit_distance || expr.hamm_distance) {
DEBUG_PRINTF("extended params not allowed\n");
return false;
}
ConstructLiteralVisitor vis;
try {
- assert(pe.component);
- pe.component->accept(vis);
+ assert(pe.component);
+ pe.component->accept(vis);
assert(vis.repeat_stack.empty());
} catch (const ConstructLiteralVisitor::NotLiteral&) {
DEBUG_PRINTF("not a literal\n");
@@ -198,7 +198,7 @@ bool shortcutLiteral(NG &ng, const ParsedExpression &pe) {
}
DEBUG_PRINTF("constructed literal %s\n", dumpString(lit).c_str());
- return ng.addLiteral(lit, expr.index, expr.report, expr.highlander,
+ return ng.addLiteral(lit, expr.index, expr.report, expr.highlander,
expr.som, expr.quiet);
}