Comments (6)
@Darkyenus this is fairly serious :(
from glsl4idea.
Okay, it looks like the cause is that GLSLParsing#parseFunctionIdentifier
tries to parse a type specifier, and if it can then it assumes it's a constructor. But a single identifier is a valid type specifier (it's a reference to an existing struct type).
I think given this there's probably no sensible way to separate constructors and functions at the parsing level - that distinction should come higher up, when a function/constructor call would resolve to either a function declaration or struct name (and the return type would be based on that).
from glsl4idea.
Noticed during prerelease testing as well, fixed in 5680358. It is not ideal, since structures can have constructors as well.
from glsl4idea.
Yeah, I'll look into that later, for now it should work well enough. The problem is, that it needs a reliable way to tell whether the name of function call corresponds to defined structure. Is that possible? This seems vaguely related to your work around rename refactoring.
from glsl4idea.
I'm going to be doing even more work on references - it should be possible to reliably resolve the name to either a struct type or a function name.
from glsl4idea.
When I tested it now on master, the struct name refactoring didn't work yet, but valid code involving struct constructor was not highlighted as error. So I won't postpone the release because of it and the constructor related code can be refactored back into function calls in next release.
from glsl4idea.
Related Issues (20)
- high CPU and error: Reference element is not the same element for which references were queried [Plugin: GLSL] HOT 5
- Support debugPrintfEXT() in Vulkan Shaders HOT 1
- Constantly throws exception HOT 3
- Targetting ShaderLab files
- Exception in shader file HOT 1
- Code Scheme Darcula (CLion like) HOT 2
- How to turn off error checking? HOT 3
- Error in CLion IntelliJ and basically all IDEs HOT 1
- NoSuchFieldError: LINE_COMMENT_ADD_SPACE HOT 4
- Preprocessor concat operator
- Scalar constructor does not accept non-scalars
- CLion hangs when editing glsl file HOT 2
- No support for GL_EXT_shader_explicit_arithmetic_types causing errors on primitive type conversions and functions HOT 1
- min/max not recognized for i64/u64 HOT 1
- Error when attempting to assign result of texture() call to uint when sampler is a usampler2D HOT 1
- com.intellij.diagnostic.PluginException: Element: class glslplugin.lang.parser.GLSLFile #GLSL because: different providers HOT 1
- Error when using Kotlin String variables inside the GLSL String
- Support for GL_EXT_ray_tracing HOT 1
- Incorrect typechecking when preprocessors are used HOT 1
- "left PSI inconsistent" exception thrown when typing ";"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glsl4idea.