Skip to content

Commit

Permalink
CHANGE: allow issues like ### or #a# (Rebol2/Red compatibility)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 12, 2024
1 parent e401edd commit 7c84b60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/l-scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2149,6 +2149,7 @@ extern REBSER *Scan_Full_Block(SCAN_STATE *scan_state, REBYTE mode_char);
|| LEX_SPECIAL_PLUS == c
|| LEX_SPECIAL_MINUS == c
|| LEX_SPECIAL_TILDE == c
|| LEX_SPECIAL_POUND == c
))
return 0;

Expand Down
10 changes: 10 additions & 0 deletions src/tests/units/lexer-test.r3
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,16 @@ Rebol [
===end-group===


===start-group=== "Issue"
--test-- {###}
;@@ https://github.com/Oldes/Rebol-issues/issues/2583
--assert "###" = try [mold transcode/one {###}]
--assert "#a#" = try [mold transcode/one {#a#}]
--assert "#ab" = try [mold transcode/one {#ab}]

===end-group===


===start-group=== "Char"
--test-- {#"^(1)"}
--assert #"^A" = load {#"^(1)"} ;@@ https://github.com/Oldes/Rebol-issues/issues/52
Expand Down

0 comments on commit 7c84b60

Please sign in to comment.