Skip to content

Commit 99bd4a8

Browse files
committed
Remove Elsif method from DSL
And add `beginning` kwarg to `IfNode` DSL method.
1 parent 4c95a2e commit 99bd4a8

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

lib/syntax_tree/dsl.rb

+3-12
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,12 +468,13 @@ def Ident(value)
478468
end
479469

480470
# Create a new IfNode node.
481-
def IfNode(predicate, statements, consequent)
471+
def IfNode(predicate, statements, consequent, beginning)
482472
IfNode.new(
483473
predicate: predicate,
484474
statements: statements,
485475
consequent: consequent,
486-
location: Location.default
476+
location: Location.default,
477+
beginning: beginning
487478
)
488479
end
489480

0 commit comments

Comments
 (0)