Hashmap -> dict in scanner
This commit is contained in:
parent
64c8f30964
commit
a3c60e0196
|
@ -622,7 +622,7 @@
|
||||||
|
|
||||||
::token/lbracket (parse-list-pattern parser)
|
::token/lbracket (parse-list-pattern parser)
|
||||||
|
|
||||||
::token/starthash (parse-dict-pattern parser)
|
::token/startdict (parse-dict-pattern parser)
|
||||||
|
|
||||||
::token/startstruct (parse-struct-pattern parser)
|
::token/startstruct (parse-struct-pattern parser)
|
||||||
|
|
||||||
|
@ -996,7 +996,7 @@
|
||||||
|
|
||||||
::token/startset (parse-set parser)
|
::token/startset (parse-set parser)
|
||||||
|
|
||||||
::token/starthash (parse-dict parser)
|
::token/startdict (parse-dict parser)
|
||||||
|
|
||||||
::token/startstruct (parse-struct parser)
|
::token/startstruct (parse-struct parser)
|
||||||
|
|
||||||
|
@ -1046,7 +1046,7 @@
|
||||||
(parser)
|
(parser)
|
||||||
(parse-script)))
|
(parse-script)))
|
||||||
|
|
||||||
(do
|
(comment
|
||||||
(def pp pp/pprint)
|
(def pp pp/pprint)
|
||||||
(def source "let #{a, b} = #{:a 1, :b 2}
|
(def source "let #{a, b} = #{:a 1, :b 2}
|
||||||
|
|
||||||
|
|
|
@ -267,10 +267,10 @@
|
||||||
;; oh god, monads
|
;; oh god, monads
|
||||||
;; additional arrow possibilities: >> ||> ~> => !>
|
;; additional arrow possibilities: >> ||> ~> => !>
|
||||||
|
|
||||||
;; hashmap #{
|
;; dict #{
|
||||||
\# (if (= next \{)
|
\# (if (= next \{)
|
||||||
(add-token (advance scanner) ::token/starthash)
|
(add-token (advance scanner) ::token/startdict)
|
||||||
(add-error scanner (str "Expected beginning of hash: #{. Got " char next)))
|
(add-error scanner (str "Expected beginning of dict: #{. Got " char next)))
|
||||||
|
|
||||||
;; set ${
|
;; set ${
|
||||||
\$ (if (= next \{)
|
\$ (if (= next \{)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user