Skip to content

Commit

Permalink
Update Gambit to v4.9.5-78-g8b18ab69 (#1030)
Browse files Browse the repository at this point in the history
Adapt to API change: `##make-locat` now takes an extra argument.
  • Loading branch information
fare authored Oct 31, 2023
1 parent 65ace2e commit 75c216c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 42 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
85 changes: 46 additions & 39 deletions doc/reference/gerbil/expander/utilities.md
Original file line number Diff line number Diff line change
@@ -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
```
Expand All @@ -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 ...)
```

Expand Down
4 changes: 2 additions & 2 deletions src/std/parser/base.ss
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 75c216c

Please sign in to comment.