evanw / glslx

A GLSL type checker, code formatter, and minifier for WebGL
http://evanw.github.io/glslx/
MIT License
408 stars 28 forks source link

Question: instead of returning "renaming" return a dictionary in all cases #5

Closed psulat closed 8 years ago

psulat commented 8 years ago

Evan,

Have you considered returning a dictionary/mapping of variables, regardless if renaming is done or not? For example, returning the following when no renaming is done.

map = { image: "image", loopCnt: "loopCnt" }

That way the output result is better abstracted and the interfacing code has no idea if the code was minimized or not. Currently, the interfacing code has to interpret the renaming value and decide what to do.

Pete

evanw commented 8 years ago

Yup I've been meaning to do that. Thanks for the reminder!