Skip to content

Commit 2d45da0

Browse files
committed
Remove Elsif method from DSL
And add `beginning` kwarg to `IfNode` DSL method.
1 parent 4d9227e commit 2d45da0

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

lib/syntax_tree/dsl.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,6 @@ def Else(keyword, statements)
347347
)
348348
end
349349

350-
# Create a new Elsif node.
351-
def Elsif(predicate, statements, consequent)
352-
Elsif.new(
353-
predicate: predicate,
354-
statements: statements,
355-
consequent: consequent,
356-
location: Location.default
357-
)
358-
end
359-
360350
# Create a new EmbDoc node.
361351
def EmbDoc(value)
362352
EmbDoc.new(value: value, location: Location.default)
@@ -478,8 +468,9 @@ def Ident(value)
478468
end
479469

480470
# Create a new IfNode node.
481-
def IfNode(predicate, statements, consequent)
471+
def IfNode(keyword, predicate, statements, consequent)
482472
IfNode.new(
473+
keyword: keyword,
483474
predicate: predicate,
484475
statements: statements,
485476
consequent: consequent,

0 commit comments

Comments
 (0)