add derivation possibility to class definition

This commit is contained in:
Torsten Ruger
2014-06-19 18:16:54 +02:00
parent 06d4ab2fe5
commit 969f2529a2
7 changed files with 48 additions and 21 deletions

View File

@ -7,7 +7,7 @@ module Parser
end
rule(:class_definition) do
keyword_class >> module_name >> eol >>
keyword_class >> module_name >> (smaller >> module_name).maybe.as(:derived_name) >> eol >>
( (keyword_end.absent? >> root_body).repeat()).as(:class_expressions) >> keyword_end >> newline
end