Pull requests

#1 Declined
Repository
quarnster quarnster
Branch
default
Repository
asmodai asmodai
Branch
default

Simplified file by including the basic source.c. Added more file extensions.

Author
  1. Fredrik Ehnbom
Reviewers
Description

No need to respecify a lot of the things glsl shares with standard c. By just including the base source.c we have all the goodies defined in that syntax for free. Something similar can probably be done for the hlsl version too, but I'm not a hlsl user so I wouldn't know ;)

Also add the discard keyword and moved the source.c to last so that rules specified in this tmLanguage file takes precedence.

Comments (2)

  1. Jeroen Ruigrok van der Werven repo owner

    I'm of two minds about this and I need to think more on it.

    The problem I have with just including source.c is that it includes a lot that is not relevant to GLSL as much as it includes things that are relevant. Also, it totally messes up scope names. Need to double check with some more knowledgeable people about the full overlap.

    On the other hand, it does duplicate a lot of C that makes it interesting enough to include as to not duplicate too much. (It is also as much a learning experience for me to see how the syntax format is built up for future endeavours.)

  2. Fredrik Ehnbom author

    Well, if the source.c include is moved to last in the file, any rules specified before it will take precedence so you could make things that are in c but not in glsl illegal.