Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove Elsif method from DSL
And add `beginning` kwarg to `IfNode` DSL method.
  • Loading branch information
egiurleo committed Mar 3, 2023
commit 2d45da0819764c098711b1923b80e8bba510929e
13 changes: 2 additions & 11 deletions lib/syntax_tree/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,6 @@ def Else(keyword, statements)
)
end

# Create a new Elsif node.
def Elsif(predicate, statements, consequent)
Elsif.new(
predicate: predicate,
statements: statements,
consequent: consequent,
location: Location.default
)
end

# Create a new EmbDoc node.
def EmbDoc(value)
EmbDoc.new(value: value, location: Location.default)
Expand Down Expand Up @@ -478,8 +468,9 @@ def Ident(value)
end

# Create a new IfNode node.
def IfNode(predicate, statements, consequent)
def IfNode(keyword, predicate, statements, consequent)
IfNode.new(
keyword: keyword,
predicate: predicate,
statements: statements,
consequent: consequent,
Expand Down