diff --git a/configure b/configure index 7d26355df..93b899015 100755 --- a/configure +++ b/configure @@ -59,7 +59,7 @@ package_out_of_tree() { readonly gerbil_version="$(git describe --tags --always)" readonly gerbil_targets="" -readonly default_gambit_tag=24201248effa23d5017be4992b5b9879e4cd3a4c +readonly default_gambit_tag=8b18ab69504c2d41301f7fec16a5350db717a20e readonly default_gambit_config="--enable-targets=${gerbil_targets} --enable-single-host --enable-dynamic-clib --enable-default-runtime-options=tE8,f8,-8 --enable-trust-c-tco" prefix="/opt/gerbil" readonly cflags_opt="-foptimize-sibling-calls" diff --git a/doc/reference/gerbil/expander/utilities.md b/doc/reference/gerbil/expander/utilities.md index e7ba9b3fc..1d751421a 100644 --- a/doc/reference/gerbil/expander/utilities.md +++ b/doc/reference/gerbil/expander/utilities.md @@ -1,134 +1,133 @@ ## Utilities ### stx-boolean? -``` +```scheme (stx-boolean? ...) ``` Please document me! ### stx-keyword? -``` +```scheme (stx-keyword? ...) ``` Please document me! ### stx-char? -``` +```scheme (stx-char? ...) ``` Please document me! ### stx-number? -``` +```scheme (stx-number? ...) ``` Please document me! ### stx-fixnum? -``` +```scheme (stx-fixnum? ...) ``` Please document me! ### stx-string? -``` +```scheme (stx-string? ...) ``` Please document me! ### stx-null? -``` +```scheme (stx-null? ...) ``` Please document me! ### stx-pair? -``` +```scheme (stx-pair? ...) ``` Please document me! ### stx-pair/null? -``` +```scheme (stx-pair/null? ...) ``` Please document me! ### stx-list? -``` +```scheme (stx-list? ...) ``` Please document me! ### stx-box? -``` +```scheme (stx-box? ...) ``` Please document me! ### stx-vector? -``` +```scheme (stx-vector? ...) ``` Please document me! ### stx-datum? -``` +```scheme (stx-datum? ...) ``` Please document me! ### stx-eq? -``` +```scheme (stx-eq? ...) ``` Please document me! ### stx-eqv? -``` +```scheme (stx-eqv? ...) ``` Please document me! ### stx-equal? -``` +```scheme (stx-equal? ...) ``` Please document me! ### stx-false? -``` +```scheme (stx-false? ...) ``` Please document me! ### stx-e -``` +```scheme (stx-e ...) ``` Please document me! ### stx-source - -``` +```scheme (stx-source stx) -> locat | #f stx := syntax ``` @@ -140,124 +139,132 @@ The `locat` structure includes the container and filepos, accessed by `##locat-c ### stx-wrap-source -``` +```scheme (stx-wrap-source stx src) -> syntax stx := any src := locat ``` ::: -Produces a new syntax object with source location `src` if `stx` is not wrapped as an AST already, otherwise returns `stx` unchanged. +Produces a new syntax object with source location `src` +if `stx` is not wrapped as an AST already, otherwise returns `stx` unchanged. -The `locat` structure can be constructed with `(##make-locat container filepos)`, where a filepos can be constructed with `(##make-filepos line col off)`. +The `locat` structure can be constructed with +`(##make-locat container filepos filepos-end)`, where: + - `container` is a string denoting a file path, or a list containing + a symbol denoting the provenance (string, port, etc.). + - `filepos` can be constructed with `(##make-filepos line col off)`. + - `filepos-end` can be `#f` if the location is a position, or + a number similar to `filepos` indicating the end position (not included) + if the location is a range. ### stx-car -``` +```scheme (stx-car ...) ``` Please document me! ### stx-cdr -``` +```scheme (stx-cdr ...) ``` Please document me! ### stx-length -``` +```scheme (stx-length ...) ``` Please document me! ### stx-for-each -``` +```scheme (stx-for-each ...) ``` Please document me! ### stx-map -``` +```scheme (stx-map ...) ``` Please document me! ### stx-foldl -``` +```scheme (stx-foldl ...) ``` Please document me! ### stx-foldr -``` +```scheme (stx-foldr ...) ``` Please document me! ### stx-reverse -``` +```scheme (stx-reverse ...) ``` Please document me! ### stx-last -``` +```scheme (stx-last ...) ``` Please document me! ### stx-last-pair -``` +```scheme (stx-last-pair ...) ``` Please document me! ### stx-list-tail -``` +```scheme (stx-list-tail ...) ``` Please document me! ### stx-list-ref -``` +```scheme (stx-list-ref ...) ``` Please document me! ### stx-andmap -``` +```scheme (stx-andmap ...) ``` Please document me! ### stx-ormap -``` +```scheme (stx-ormap ...) ``` Please document me! ### stx-plist? -``` +```scheme (stx-plist? ...) ``` Please document me! ### stx-getq -``` +```scheme (stx-getq ...) ``` diff --git a/src/std/parser/base.ss b/src/std/parser/base.ss index 6e8a7302a..d32c55557 100644 --- a/src/std/parser/base.ss +++ b/src/std/parser/base.ss @@ -76,10 +76,10 @@ (##port-name port))) (filepos (##make-filepos line col off))) - (##make-locat container filepos)))) + (##make-locat container filepos #f)))) (def (display-location loc (port (current-output-port))) - (##display-locat (location->source-location loc) #t port)) + (##display-locat (location->source-location loc) #t port)) ;; location [start end] (def (location-delta start end)