waxeye-org / waxeye

Waxeye is a parser generator based on parsing expression grammars (PEGs). It supports C, Java, JavaScript, Python, Racket, and Ruby.
https://waxeye-org.github.io/waxeye/index.html
Other
235 stars 38 forks source link

TypeScript Runtime: Cons Lists #81

Closed glebm closed 6 years ago

glebm commented 7 years ago
  1. Use cons lists instead of Arrays (all we ever do is prepend and get head and tail).
  2. Separate Expr config types and the internal representation.
  3. Move Expr type definitions to a separate file.

Also renames ANY to ANY_CHAR for clarity.

@jishi9 @ddrone Please review!

orlandohill commented 6 years ago

Sorry for the slow response.

Overall, this looks great!

Would it make more sense for Expr to remain the name of the exported type, and have some other name for the internal type?

glebm commented 6 years ago

Would it make more sense for Expr to remain the name of the exported type, and have some other name for the internal type?

Sure, any thoughts on a good name? RuntimeExpr?

orlandohill commented 6 years ago

Yeah, RuntimeExpr sounds good. It also fits with the naming of ParserConfig and RuntimeParserConfig.

glebm commented 6 years ago

@orlandohill Done!

orlandohill commented 6 years ago

Great, thanks! :)

orlandohill commented 6 years ago

Should I be doing normal merge commits, rather than squashing, by default? I assume it's better to preserve the commit history, and maybe it's easier at your end too.

glebm commented 6 years ago

I generally prefer to squash, these intermediate commits are not very important and it keeps the master branch history clean.

orlandohill commented 6 years ago

Thanks, that's good to know. I'll do that by default.