Skip to main content

parse_shape

Function parse_shape 

Source
pub fn parse_shape(sexpr: &SExpr) -> Result<ShapeConstraint, String>
Expand description

Parse a (shape performative-name rule...) S-expression into a ShapeConstraint (REQ-221).

Grammar:

shape-clause = "(" "shape" performative-name 1*(shape-rule) ")"
shape-rule   = require-rule / optional-rule / max-depth-rule