1.10 Debugging and Inspection Tools
(require syntax/parse/debug) | package: base |
The following special forms are for debugging syntax classes.
syntax
(syntax-class-attributes syntax-class-id)
syntax
(syntax-class-arity syntax-class-id)
syntax
(syntax-class-keywords syntax-class-id)
syntax
(syntax-class-parse syntax-class-id stx-expr arg ...)
stx-expr : syntax?
syntax
(debug-parse stx-expr S-pattern ...+)
stx-expr : syntax?
The failure S-expression shows both the raw set of failures (unsorted) and the failures with maximal progress. The maximal failures are divided into equivalence classes based on their progress (progress is a partial order); that is, failures within an equivalence class have the same progress and, in principle, pinpoint the same term as the problematic term. Multiple equivalence classes only arise from ~parse patterns (or equivalently, #:with clauses) that match computed terms or ~fail (#:fail-when, etc) clauses that allow a computed term to be pinpointed.
procedure
Added in version 6.5.0.3 of package base.