Skip to content
Browse files

added some inspection functions for syntax objects

  • Loading branch information...
1 parent bff42d6 commit de54fd79ed8b7dd28e18924aa1c64ba45adf7add @marcomaggi committed
Showing with 74 additions and 1 deletion.
  1. +61 −0 doc/vicare.texi
  2. +5 −0 scheme/makefile.sps
  3. +8 −1 scheme/psyntax.expander.sls
View
61 doc/vicare.texi
@@ -2246,6 +2246,67 @@ representing the position of the expression in the source code.
@section Interface to the expander
+@menu
+* iklib expander syntax:: Inspecting syntax objects.
+* iklib expander transformers:: Syntax transformers facilities.
+* iklib expander expand:: Expander facilities.
+@end menu
+
+@c page
+@node iklib expander syntax
+@subsection Inspecting syntax objects
+
+
+Under @value{PRJNAME}, a syntax object is the instance of a data
+structure. The following bindings are exported by the @library{ikarus}
+library.
+
+
+@defun syntax-object? @var{stx}
+Return @true{} if @var{stx} is a syntax object, else return @false{}.
+@end defun
+
+
+@defun syntax-object-expression @var{stx}
+@defunx syntax-object-marks @var{stx}
+@defunx syntax-object-substs @var{stx}
+@defunx syntax-object-source-objects @var{stx}
+Field accessors for the syntax object structure type, to be used for
+debugging purposes.
+@end defun
+
+@c page
+@node iklib expander transformers
+@subsection Syntax transformers facilities
+
+
+The following bindings are exported by the @library{ikarus} library.
+
+
+@defun variable-transformer?
+Undocumented.
+@end defun
+
+
+@defun variable-transformer-procedure
+Undocumented.
+@end defun
+
+
+@defun make-compile-time-value
+Undocumented.
+@end defun
+
+
+@defun syntax-transpose
+Undocumented.
+@end defun
+
+@c page
+@node iklib expander expand
+@subsection Expander facilities
+
+
The following bindings are exported by the @library{ikarus} library.
View
5 scheme/makefile.sps
@@ -1730,6 +1730,11 @@
(variable-transformer-procedure i v $language)
(make-compile-time-value i v $language)
(syntax-transpose i v $language)
+ (syntax-object? i v $language)
+ (syntax-object-expression i v $language)
+ (syntax-object-marks i v $language)
+ (syntax-object-substs i v $language)
+ (syntax-object-source-objects i v $language)
(char-alphabetic? i v r uc se)
(char-ci<=? i v r uc se)
(char-ci<? i v r uc se)
View
9 scheme/psyntax.expander.sls
@@ -45,7 +45,14 @@
variable-transformer-procedure
syntax-dispatch syntax-transpose
- ellipsis-map)
+ ellipsis-map
+
+ ;;The following are inspection functions for debugging purposes.
+ (rename (<stx>? syntax-object?)
+ (<stx>-expr syntax-object-expression)
+ (<stx>-mark* syntax-object-marks)
+ (<stx>-subst* syntax-object-substs)
+ (<stx>-ae* syntax-object-source-objects)))
(import (except (rnrs)
eval
environment environment?

0 comments on commit de54fd7

Please sign in to comment.
Something went wrong with that request. Please try again.