nolanderc / glsl_analyzer

Language server for GLSL (autocomplete, goto-definition, formatter, and more)
GNU General Public License v3.0
188 stars 5 forks source link

top-down name resolution #29

Closed nolanderc closed 11 months ago

nolanderc commented 11 months ago

Previously, name resolution worked by walking the parse tree upwards from the selected syntax node, returning any declarations it found in the upward traversal to the root. However, this caused various issues due to missing context about what the parent node was.

For example, in #25 it was found that field declarations were registered multiple times, since both the struct declaration and the field declaration itself registered the field.

Closes #25.