This also allows dictionary values to be variables instead of just
regular identifiers, a change which might be made to other literals
such as lists and tuples in the future as we determine what those
also support.
| STRING_LITERAL\r
| NUMBER_LITERAL\r
| BOOLEAN_LITERAL\r
+ | DICTIONARY_LITERAL\r
| LIST_LITERAL\r
| TUPLE_LITERAL\r
;\r
\r
+DICTIONARY_LITERAL\r
+ =\r
+ literal_type:`dictionary`\r
+ (\r
+ | ( "{" {SP}* value+:dictionary_key_value { {SP}* "," {SP}* value+:dictionary_key_value } {SP}* "}" )\r
+ | ( "{" {SP}* "}" )\r
+ )\r
+ ;\r
+\r
+dictionary_key_value\r
+ =\r
+ key:STRING_LITERAL {SP}* ":" {SP}* value:variable_identifier\r
+ ;\r
+\r
LIST_LITERAL\r
=\r
literal_type:`list`\r