google / amber

Amber is a multi-API shader test framework
Apache License 2.0
188 stars 63 forks source link

"end" in a token seen as END #955

Open normrubin opened 3 years ago

normrubin commented 3 years ago

Given this fragment shader

SHADER fragment frag GLSL

version 450

extension GL_ARB_separate_shader_objects : enable

def RENDERX XXX

void main() {;} END

amber sees the RENDERX as R END ERX ( the call to extractToNext does not make sure this is a full token) it does wait for an uppercase END so this mostly messes up with macros

example_4_bad: 16: SHADER missing END command

Is is kind of an odd error message as well since its actually an extra END