Skip to main content

Module parser

Module parser 

Source
Expand description

Parser for choreographic protocol syntax.

This module provides a full implementation using Pest grammar for parsing choreographic DSL specifications into the Protocol AST.

§Module Structure

  • error: Error types and span information for diagnostics
  • types: Internal AST types for parsing (Statement, ChoiceBranch, etc.)
  • role: Role parsing (declarations, references, indices, ranges)
  • statement: Statement parsing (send, choice, loop, etc.)
  • conversion: Protocol conversion and call inlining

Structs§

ErrorSpan
Span information for error reporting
LintDiagnostic
Structured lint diagnostic with optional fix suggestion.

Enums§

LintLevel
Lint level for parser diagnostics.
ParseError
Parse errors that can occur during choreography parsing
Rule

Constants§

DEFAULT_SOURCE_EXTENSION
Canonical source-file extension for Telltale choreography files.

Functions§

choreography_macro
Example of how the macro entry point works.
collect_dsl_lints
Collect DSL lint diagnostics for a parsed choreography.
explain_lowering
Produce a canonical lowering report for a DSL snippet.
parse_choreography
Parse a choreographic protocol from a token stream for macro use.
parse_choreography_file
Parse a choreography from a file
parse_choreography_str
Parse a choreographic protocol from a string
parse_choreography_str_with_extensions
Parse a choreographic protocol from a string with extension support
parse_dsl
Parse choreography DSL
render_lsp_lint_diagnostics
Render lint diagnostics into a lightweight LSP-like JSON string.