-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from Chia-Network/20240706-modern-quotes
Change how string output is generated for atoms and strings
- Loading branch information
Showing
4 changed files
with
140 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
;; | ||
;; This program is used by the test_quote_string_generation test | ||
;; which checks the representation of these outputs and ensures | ||
;; that they're properly accepted by brun, which uses the classic | ||
;; chialisp tokenizer/parser. | ||
;; | ||
;; the qs macro appends the given string onto "test" | ||
;; the atom macro gives a quoted atom starting with test and | ||
;; ending with the text given in the string. | ||
;; | ||
;; modern's macro system makes these different objects. | ||
;; | ||
(mod () | ||
(include *standard-cl-23*) | ||
|
||
(defmac qs (X) (string-append "test" X)) | ||
(defmac atom (X) (c 1 (string->symbol (string-append "test" X)))) | ||
|
||
(list (qs '"') (qs "'") (qs " hi") (atom '"') (atom "'") (atom "_hi")) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters