guida-lang/glsl/1.0.0

Language.GLSL.Parser

This module is part of an Elm implementation of a GLSL parser, inspired by the Haskell GLSL parser.

Reference: https://hackage.haskell.org/package/language-glsl-0.3.0/docs/src/Language.GLSL.Parser.html

This implementation attempts to adapt the concepts and structure from the Haskell parser into the Elm ecosystem.

String
-> Result
{ position : Int
, messages : List String
}

Parses a GLSL shader string into an abstract syntax tree (AST).

This function attempts to parse a given GLSL shader and returns either the parsed result as a TranslationUnit type or an error message if parsing fails.