2014-05-29 14:57:33 +02:00
|
|
|
module Parser
|
|
|
|
module ModuleDef
|
|
|
|
include Parslet
|
2014-05-30 09:42:43 +02:00
|
|
|
rule(:module_definition) do
|
2014-05-29 14:57:33 +02:00
|
|
|
keyword_module >> name >> eol >>
|
|
|
|
( (keyword_end.absent? >> root).repeat(1)).as(:module_expressions) >> keyword_end >> newline
|
|
|
|
end
|
2014-05-30 09:59:49 +02:00
|
|
|
|
|
|
|
rule(:class_definition) do
|
|
|
|
keyword_class >> name >> eol >>
|
|
|
|
( (keyword_end.absent? >> root).repeat(1)).as(:class_expressions) >> keyword_end >> newline
|
|
|
|
end
|
|
|
|
|
2014-05-29 14:57:33 +02:00
|
|
|
end
|
|
|
|
end
|