Skip to content

Commit

Permalink
add an introductory comment in the expander module
Browse files Browse the repository at this point in the history
  • Loading branch information
countvajhula committed Mar 27, 2024
1 parent f2fd3e6 commit 05454b0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions qi-lib/flow/extended/expander.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@
syntax/parse
"../../private/util.rkt"))

#|
This module implements the Qi expander using Syntax Spec. Here, we
notate the core language grammar from which Syntax Spec infers and
constructs an appropriate expander. As part of this, we annotate the
grammar with binding scope rules (e.g. for the `as` form) which allows
the expander to propagate scope in accordance with these specified
rules and also raise errors at compile time when identifiers used are
unbound.
In addition to the core language grammar and scoping rules, we also
specify a few ad hoc expansion rules here in order to expand surface
syntax that may not be neatly expressible as a macro to an appropriate
use of a core form. Such rules are necessary so that the core language
can be uniformly expressed in terms of such prefix forms (it's similar
to the Racket core language's use of #%app, etc.).
|#

(syntax-spec

;; Declare a compile-time datatype by which qi macros may
Expand Down

0 comments on commit 05454b0

Please sign in to comment.