add keyword and operators as seperate parser modules
This commit is contained in:
parent
28410ab22a
commit
583e6f0c9f
9
lib/parser/keywords.rb
Normal file
9
lib/parser/keywords.rb
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module Parser
|
||||||
|
module Keywords
|
||||||
|
include Parslet
|
||||||
|
rule(:keyword_if) { str('if') >> space? }
|
||||||
|
rule(:keyword_else) { str('else') >> space? }
|
||||||
|
rule(:keyword_def) { str('def') >> space? }
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
0
lib/parser/operators.rb
Normal file
0
lib/parser/operators.rb
Normal file
Loading…
Reference in New Issue
Block a user