Refactor shader_parse.c