pointlander / peg

Peg, Parsing Expression Grammar, is an implementation of a Packrat parser generator.
BSD 3-Clause "New" or "Revised" License
1.02k stars 121 forks source link

Allow digits in imported package names #118

Closed roflcopter4 closed 4 years ago

roflcopter4 commented 4 years ago

Go package imports can contain digits. In the present implementation any such import is rejected as a parsing error. I simply added 0-9 to the allowable characters for an ImportName to fix this.

The astute may note that my own profile name contains a digit, and therefore without this change none of my own packages can be imported into a grammar file.

Seriously though smallest change ever, all tests are still passed, and I can't think of any way this could cause any sort of problem.