summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/pipeline/expression/lexeme.rb
blob: bbf3fec74076f69bd9eea78781199f80013393d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Gitlab
  module Ci
    module Pipeline
      module Expression
        class Lexeme
          def evaluate(**variables)
            raise NotImplementedError
          end

          def self.scan(scanner)
            if scanner.scan(self::PATTERN)
              Expression::Token.new(scanner.matched, self)
            end
          end
        end
      end
    end
  end
end