Commit 523b84d4 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Move pipeline expressions grammar from lexer to parser

parent 4e9f017e
...@@ -2,14 +2,6 @@ module Gitlab ...@@ -2,14 +2,6 @@ module Gitlab
module Ci module Ci
module Pipeline module Pipeline
module Expression 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 class Lexer
def initialize(statement) def initialize(statement)
@statement = statement @statement = statement
......
...@@ -3,6 +3,14 @@ module Gitlab ...@@ -3,6 +3,14 @@ module Gitlab
module Pipeline module Pipeline
module Expression module Expression
class Statement 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) def initialize(pipeline, statement)
@pipeline = pipeline @pipeline = pipeline
@statement = statement @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