laurentlb/shader-minifier

Error messages: wrong line for parse error in buffer block

Opened this issue · 1 comments

This does not affect minification, but is a minor inconvenience when encountering minifier bugs.

Given an unparseable input:

#version 450
buffer bufblock {
  float A;
  float [float];
};
Parse error: Error in bufferblock.glsl: Ln: 2 Col: 8
buffer bufblock {
       ^
Expecting: Type qualifier, ';' or 'layout'

The first line of the buffer block is reported, making it harder to find the real problem in a block definition several lines long.
This is a more serious problem when it's encountered on valid GLSL that Minifier does not parse correctly.

Same issue here