Hashmap -> dict in scanner

This commit is contained in:
Scott Richmond 2022-05-26 18:54:51 -04:00
parent 64c8f30964
commit a3c60e0196
2 changed files with 6 additions and 6 deletions

View File

@ -622,7 +622,7 @@
::token/lbracket (parse-list-pattern parser)
::token/starthash (parse-dict-pattern parser)
::token/startdict (parse-dict-pattern parser)
::token/startstruct (parse-struct-pattern parser)
@ -996,7 +996,7 @@
::token/startset (parse-set parser)
::token/starthash (parse-dict parser)
::token/startdict (parse-dict parser)
::token/startstruct (parse-struct parser)
@ -1046,7 +1046,7 @@
(parser)
(parse-script)))
(do
(comment
(def pp pp/pprint)
(def source "let #{a, b} = #{:a 1, :b 2}

View File

@ -267,10 +267,10 @@
;; oh god, monads
;; additional arrow possibilities: >> ||> ~> => !>
;; hashmap #{
;; dict #{
\# (if (= next \{)
(add-token (advance scanner) ::token/starthash)
(add-error scanner (str "Expected beginning of hash: #{. Got " char next)))
(add-token (advance scanner) ::token/startdict)
(add-error scanner (str "Expected beginning of dict: #{. Got " char next)))
;; set ${
\$ (if (= next \{)