BigW Consortium Gitlab

Commit 4e9f017e by Grzegorz Bizon

Rename tokens to lexemes in pipeline expressions

parent 2125d6fa
......@@ -2,7 +2,7 @@ module Gitlab
module Ci
module Pipeline
module Expression
class Equals < Expression::Token
class Equals < Expression::Lexeme
PATTERN = /==/.freeze
def initialize(left, right)
......
......@@ -2,15 +2,11 @@ module Gitlab
module Ci
module Pipeline
module Expression
class Token
class Lexeme
def evaluate(**variables)
raise NotImplementedError
end
def self.build(string)
raise NotImplementedError
end
def self.scan(scanner)
scanner.scan(PATTERN)
end
......
......@@ -2,7 +2,7 @@ module Gitlab
module Ci
module Pipeline
module Expression
class Null < Expression::Token
class Null < Expression::Lexeme
PATTERN = /null/.freeze
def initialize(value)
......
......@@ -2,7 +2,7 @@ module Gitlab
module Ci
module Pipeline
module Expression
class String < Expression::Token
class String < Expression::Lexeme
PATTERN = /("|')(?<value>.+)('|")/.freeze
def initialize(value)
......
......@@ -2,7 +2,7 @@ module Gitlab
module Ci
module Pipeline
module Expression
class Equality < Expression::Token
class Equality < Expression::Lexeme
PATTERN = /$(?<name>\w+)/.freeze
def initialize(value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment