glados-0.1.0.0
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parser.Statement

Description

This module defines parsers for the structural elements of the language: - Variable definitions - Function declarations - Return statements - Type annotations - Code blocks

Synopsis

Documentation

parseALL :: Text -> Either (ParseErrorBundle Text Void) [Ast] Source #

Main entry point for the parser.

Parses a list of statements from the input text until EOF. The filename argument is used for error reporting.

pStatement :: Parser Ast Source #

Main statement parser.

Aggregates all statement types (control flow, declarations, basic instructions) into a single choice. This is the top-level parser for a line of code.