This file contains hidden or 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
from typing import Any, Dict, List, Mapping, Union | |
# Values for JSON that aren't nested | |
JSON_v = Union[str, int, float, bool, None] | |
# If MyPy ever permits recursive definitions, just uncomment this: | |
# JSON = Union[List['JSON'], Mapping[str, 'JSON'], JSON_v] | |
# Until then, here's a multi-layer way to represent any (reasonable) JSON we | |
# might send or receive. It terminates at JSON_4, so the maximum depth of |
This file contains hidden or 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
#lang racket/base | |
(require racket/sandbox | |
racket/runtime-path | |
"parser.rkt" | |
"tokenizer.rkt" | |
"expander.rkt" | |
syntax/strip-context) | |
;; To pass to the module datum |
This file contains hidden or 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
('uncursed magic marker', 3987) | |
('2 blessed scrolls of charging', 3889) | |
('magic marker', 3571) | |
('blessed magic marker', 2540) | |
('blessed greased +2 silver dragon scale mail', 1167) | |
('blessed +2 silver dragon scale mail', 1105) | |
('3 blessed scrolls of charging', 1096) | |
('blessed +2 gray dragon scale mail', 1033) | |
('blessed spellbook of identify', 886) | |
('2 blessed scrolls of genocide', 850) |