Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0c8177a

Browse files
committed
Remove Elsif method from DSL
And add `beginning` kwarg to `IfNode` DSL method.
1 parent 23f5a90 commit 0c8177a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

lib/syntax_tree/dsl.rb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,6 @@ def Else(keyword, statements)
335335
)
336336
end
337337

338-
# Create a new Elsif node.
339-
def Elsif(predicate, statements, consequent)
340-
Elsif.new(
341-
predicate: predicate,
342-
statements: statements,
343-
consequent: consequent,
344-
location: Location.default
345-
)
346-
end
347-
348338
# Create a new EmbDoc node.
349339
def EmbDoc(value)
350340
EmbDoc.new(value: value, location: Location.default)
@@ -466,12 +456,13 @@ def Ident(value)
466456
end
467457

468458
# Create a new IfNode node.
469-
def IfNode(predicate, statements, consequent)
459+
def IfNode(predicate, statements, consequent, beginning)
470460
IfNode.new(
471461
predicate: predicate,
472462
statements: statements,
473463
consequent: consequent,
474-
location: Location.default
464+
location: Location.default,
465+
beginning: beginning
475466
)
476467
end
477468

0 commit comments

Comments
 (0)