ashima/gloc — Issue #6: Dissolve Interleaved Token Stream Chunks and PP Directives
Author: dsheets
Created: 2012-03-10 02:59:57+00:00
State: open

Presently something like:

void main() {
#if X
gl_Position = vec4(0.,0.,0.,1.);
#else
gl_Position = vec4(1.,1.,1.,1.);
#endif
}

does not properly dissolve. To correctly dissolve this, the 'dissolve' function in glo.ml needs to detect EsslParseErrors occurring at the initial or final tokens in a Chunk token stream and then attempt to fuse the chunk with the appropriate neighboring chunks under the preprocessor recursively (and yield the original sequence of preprocessor expressions that successfully parse as ESSL).