BigW Consortium Gitlab

Commit 523b84d4 by Grzegorz Bizon

Move pipeline expressions grammar from lexer to parser

parent 4e9f017e
......@@ -2,14 +2,6 @@ module Gitlab
module Ci
module Pipeline
module Expression
GRAMMAR = [
%w[variable equals string],
%w[variable equals variable],
%w[variable equals null],
%w[string equals variable],
%w[null equals variable],
]
class Lexer
def initialize(statement)
@statement = statement
......
......@@ -3,6 +3,14 @@ module Gitlab
module Pipeline
module Expression
class Statement
GRAMMAR = [
%w[variable equals string],
%w[variable equals variable],
%w[variable equals null],
%w[string equals variable],
%w[null equals variable],
]
def initialize(pipeline, statement)
@pipeline = pipeline
@statement = statement
......
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