Class: Code::Parser::IfModifier
Instance Method Summary
collapse
#right_statement, #root, #whitespace?
Instance Method Details
#if_keyword ⇒ Object
14
15
16
|
# File 'lib/code/parser/if_modifier.rb', line 14
def if_keyword
str("if")
end
|
30
31
32
|
# File 'lib/code/parser/if_modifier.rb', line 30
def operator
if_keyword | unless_keyword | while_keyword | until_keyword
end
|
#statement ⇒ Object
6
7
8
|
# File 'lib/code/parser/if_modifier.rb', line 6
def statement
OrKeyword
end
|
#unless_keyword ⇒ Object
18
19
20
|
# File 'lib/code/parser/if_modifier.rb', line 18
def unless_keyword
str("unless")
end
|
#until_keyword ⇒ Object
26
27
28
|
# File 'lib/code/parser/if_modifier.rb', line 26
def until_keyword
str("until")
end
|
#while_keyword ⇒ Object
22
23
24
|
# File 'lib/code/parser/if_modifier.rb', line 22
def while_keyword
str("while")
end
|
#whitespace ⇒ Object
10
11
12
|
# File 'lib/code/parser/if_modifier.rb', line 10
def whitespace
Whitespace.new.without_newline
end
|