frostc-1.0.0.0: The Frost Programming Language Compiler
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ast.Parser.PreProcessor.Define

Synopsis

Documentation

parseDefines :: Parser String Source #

Parses define directives. Supports conditional logic based on environment variables. Returns the processed string after applying defines.

parseDefine :: Parser String Source #

Parses a `?defined` directive. The directive checks if an environment variable is defined. If the variable exists, the thenBlock is returned. Otherwise, the elseBlock (if present) is returned.

parseSet :: Parser String Source #

Parses a `?set` directive. The directive sets an environment variable to an empty value.