-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing comments? #116
Comments
Comments are currently already supported. Can you explain more about your problem? :) |
Oh my mistake! Then I guess my question should be - how do I go about using |
Hm. Which form your input string has? |
Here's a single example of the kind of file I'm trying to parse: /*{
"DESCRIPTION": "demonstrates the use of multiple image-type inputs",
"CREDIT": "by zoidberg",
"ISFVSN": "2.0",
"CATEGORIES": [
"TEST-GLSL FX"
],
"INPUTS": [
{
"NAME": "inputImage",
"TYPE": "image"
}
],
"IMPORTED": {
"blendImage": {
"PATH": "Hexagon.tiff"
}
}
}*/
void main()
{
vec4 srcPixel = IMG_NORM_PIXEL(inputImage, isf_FragNormCoord);
vec4 blendPixel = IMG_NORM_PIXEL(blendImage, isf_FragNormCoord);
gl_FragColor = (srcPixel + blendPixel)/2.0;
} I'd like to be able to retrieve the contents of the top comment as a At the moment I'm manually searching for |
Hm. Currently, it’s a bit hard because comments are simply discarded by the space parser. However, I have a pretty similar problem with preprocessor directives. I’ll try to come up with a solution to this as soon as possible. |
No rush/pressure at all, and thanks so much for your prompt response and all your work! ❤️ |
I'm having this issue as well, any news? |
Thanks so much for this crate @phaazon :)
I was planning on using this along with a json crate to create a small lib for parsing ISF aka Interactive Shader Format files and generating the GLSL they require. Unfortunately, they declare their JSON blob in a top-level comment! Would you have any interest in seeing a
Comment
variant added to the syntax tree somehow? If so, how would one go about doing this?The text was updated successfully, but these errors were encountered: