ptal / oak

A typed parser generator embedded in Rust code for Parsing Expression Grammars
Apache License 2.0
142 stars 14 forks source link

type are not always composed of sub-expression types. #37

Closed ptal closed 9 years ago

ptal commented 9 years ago

Using the type visitor alone is wrong because it assumes we visit all types, but we don't visit type under &, !, or semantic action for example. We must use the expression visitor, maybe with the type visitor inside it.

ptal commented 9 years ago

It's the desirable behavior for the inlining loop checking phase. However, propagation and inlining need to visit everything to be correct.