add keyword and operators as seperate parser modules

This commit is contained in:
Torsten Ruger 2014-04-27 21:12:24 +03:00
parent 28410ab22a
commit 583e6f0c9f
2 changed files with 9 additions and 0 deletions

9
lib/parser/keywords.rb Normal file
View 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
View File