Skip to content

Commit

Permalink
Change ANY-BINDABLE? to just BINDABLE?
Browse files Browse the repository at this point in the history
Also change sigil test to use DEGRADE instead of UNMETA, saving on
some ugly quote marks.
  • Loading branch information
hostilefork committed Mar 3, 2024
1 parent 788ed9f commit 91e326e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/boot/types.r
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ pair "two dimensional point or size"
; BEGIN BINDABLE TYPES - SEE Is_Bindable() - Cell's "extra" USED FOR BINDING
; ============================================================================

<ANY-BINDABLE?>
<BINDABLE?>

<ANY-WORD?> ; (order matters, see Sigilize_Any_Plain_Kind())

Expand Down Expand Up @@ -440,7 +440,7 @@ pair "two dimensional point or size"

</ANY-ARRAY?>

</ANY-BINDABLE?>
</BINDABLE?>


; ============================================================================
Expand Down
20 changes: 10 additions & 10 deletions tests/datatypes/sigil.test.reb
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@

; Test SIGIL OF for each bindable type
(
for-each [sigil' items] [
~null~ [ word tu.p.le pa/th [bl o ck] (gr o up) ]
':: [ word: tu.p.le: pa/th: [bl o ck]: (gr o up): ]
': [ :word :tu.p.le :pa/th :[bl o ck] :(gr o up) ]
'^ [ ^word ^tu.p.le ^pa/th ^[bl o ck] ^(gr o up) ]
'& [ &word &tu.p.le &pa/th &[bl o ck] &(gr o up) ]
'@ [ @word @tu.p.le @pa/th @[bl o ck] @(gr o up) ]
'$ [ $word $tu.p.le $pa/th $[bl o ck] $(gr o up) ]
for-each [sigil items] [
~null~ [ word tu.p.le pa/th [bl o ck] (gr o up) ]
:: [ word: tu.p.le: pa/th: [bl o ck]: (gr o up): ]
: [ :word :tu.p.le :pa/th :[bl o ck] :(gr o up) ]
^ [ ^word ^tu.p.le ^pa/th ^[bl o ck] ^(gr o up) ]
& [ &word &tu.p.le &pa/th &[bl o ck] &(gr o up) ]
@ [ @word @tu.p.le @pa/th @[bl o ck] @(gr o up) ]
$ [ $word $tu.p.le $pa/th $[bl o ck] $(gr o up) ]
][
for-each item items [
assert [any-bindable? item]
if (unmeta sigil') <> sigil of item [
assert [bindable? item]
if (degrade sigil) <> sigil of item [
fail [mold item]
]
]
Expand Down
2 changes: 1 addition & 1 deletion tools/make-boot.r
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ for-each-typerange: func [
; ANY_META() in the C code. Extract relevant name part.
;
parse2 name* [
remove "any-"
opt remove "any-"
to "?" ; once dropped -VALUE from e.g. ANY-META-VALUE?
remove "?"
] else [
Expand Down

0 comments on commit 91e326e

Please sign in to comment.