Skip to content

Commit

Permalink
FEAT: Define a WHITESPACE charset
Browse files Browse the repository at this point in the history
related to: metaeducation/rebol-issues#2189
mentioned: http://www.rebol.net/r3decide/0008.html

Using just the most basic _whitespace_ chars. Anyone may extended this charset if needed.
This one is compatible with Red language.
  • Loading branch information
Oldes committed Feb 5, 2020
1 parent 99dfa78 commit 1162e7d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mezz/base-constants.r
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,24 @@ sys: system/contexts/sys
lib: system/contexts/lib

;-- Char constants:
null: #"^(NULL)"
null: #"^@"
space: #" "
sp: space
backspace: #"^(BACK)"
backspace: #"^H"
bs: backspace
tab: #"^-"
newline: #"^/"
newpage: #"^l"
slash: #"/"
backslash: #"\"
escape: #"^(ESC)"
escape: #"^["
cr: #"^M"
lf: newline
crlf: "^M^J"

;-- Bitset constants
whitespace: #[bitset! #{0064000080}] ;= charset [#" " #"^-" #"^/" #"^M"]

;-- Function synonyms:
q: :quit
!: :not
Expand Down

0 comments on commit 1162e7d

Please sign in to comment.