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/lexeme/operator.rb')
-rw-r--r--lib/gitlab/ci/pipeline/expression/lexeme/operator.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/gitlab/ci/pipeline/expression/lexeme/operator.rb b/lib/gitlab/ci/pipeline/expression/lexeme/operator.rb
index 3ddab7800c8..a740c50c900 100644
--- a/lib/gitlab/ci/pipeline/expression/lexeme/operator.rb
+++ b/lib/gitlab/ci/pipeline/expression/lexeme/operator.rb
@@ -6,24 +6,10 @@ module Gitlab
module Expression
module Lexeme
class Operator < Lexeme::Base
- # This operator class is design to handle single operators that take two
- # arguments. Expression::Parser was originally designed to read infix operators,
- # and so the two operands are called "left" and "right" here. If we wish to
- # implement an Operator that takes a greater or lesser number of arguments, a
- # structural change or additional Operator superclass will likely be needed.
-
OperatorError = Class.new(Expression::ExpressionError)
- def initialize(left, right)
- raise OperatorError, 'Invalid left operand' unless left.respond_to? :evaluate
- raise OperatorError, 'Invalid right operand' unless right.respond_to? :evaluate
-
- @left = left
- @right = right
- end
-
def self.type
- :operator
+ raise NotImplementedError
end
def self.precedence