make rule have type and name
Merge pull request #27 from grammarjs/refactor/rule

make rule have type and name