2018-02-23 04:01:27 -05:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Pipeline
|
|
|
|
module Expression
|
|
|
|
module Lexeme
|
2018-02-23 04:13:43 -05:00
|
|
|
class Equals < Lexeme::Operator
|
2018-02-23 04:01:27 -05:00
|
|
|
PATTERN = /==/.freeze
|
|
|
|
|
|
|
|
def initialize(left, right)
|
|
|
|
@left = left
|
|
|
|
@right = right
|
|
|
|
end
|
|
|
|
|
2018-02-23 05:23:18 -05:00
|
|
|
def evaluate(**variables)
|
2018-02-23 04:01:27 -05:00
|
|
|
@left.evaluate(variables) == @right.evaluate(variables)
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.build(_value, behind, ahead)
|
|
|
|
new(behind, ahead)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|