Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/pipeline/expression/parser.rb')
-rw-r--r--lib/gitlab/ci/pipeline/expression/parser.rb28
1 files changed, 1 insertions, 27 deletions
diff --git a/lib/gitlab/ci/pipeline/expression/parser.rb b/lib/gitlab/ci/pipeline/expression/parser.rb
index 27d7aa2f37e..a20b0015e05 100644
--- a/lib/gitlab/ci/pipeline/expression/parser.rb
+++ b/lib/gitlab/ci/pipeline/expression/parser.rb
@@ -15,12 +15,7 @@ module Gitlab
def tree
results = []
- tokens =
- if ::Gitlab::Ci::Features.ci_if_parenthesis_enabled?
- tokens_rpn
- else
- legacy_tokens_rpn
- end
+ tokens = tokens_rpn
tokens.each do |token|
case token.type
@@ -78,27 +73,6 @@ module Gitlab
output.concat(operators.reverse)
end
-
- # To be removed with `ci_if_parenthesis_enabled`
- def legacy_tokens_rpn
- output = []
- operators = []
-
- @tokens.each do |token|
- case token.type
- when :value
- output.push(token)
- when :logical_operator
- if operators.any? && token.lexeme.precedence >= operators.last.lexeme.precedence
- output.push(operators.pop)
- end
-
- operators.push(token)
- end
- end
-
- output.concat(operators.reverse)
- end
end
end
end