Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Added GLSL parser #115

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

decioferreira
Copy link

An initial implementation for the WebGL Shader (GLSL) parser.

src/Elm/AST/Typed.elm Outdated Show resolved Hide resolved
@@ -406,6 +406,10 @@ shrinkExpr expr =
-- TODO take a stab at this? Do we actually even generate these?
nope

CanonicalU.Shader _ ->
-- TODO take a stab at this? Do we actually even generate these?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we would have to make well-defined GLSL programs here. Let's leave it as it is right now 👍

@Janiczek
Copy link
Contributor

Looks good so far!
Please let's add one more example to ParserTest with a correct GLSL program (can be very simple but probably should use the varyings etc. that change the type of the shader).

I'm curious to see how the shader type turns out! Don't hesitate to ask on Discord if you want help with generating the type equations :)

(Type inference tests will be the most interesting and important part here I believe.)

@decioferreira
Copy link
Author

added two more examples to the shader parser tests, based of https://github.com/elm-explorations/webgl/blob/81527c23ba21d9bf92f34151a6a4c40a68460e1f/examples/Triangle.elm#L77-L105

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants