167 lines
2.7 KiB
Plaintext
167 lines
2.7 KiB
Plaintext
=====================================
|
|
empty
|
|
=====================================
|
|
|
|
%{}
|
|
|
|
---
|
|
|
|
(source
|
|
(map))
|
|
|
|
=====================================
|
|
from keywords
|
|
=====================================
|
|
|
|
%{a: 1, b: 2}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(map_content
|
|
(keywords
|
|
(pair
|
|
(keyword)
|
|
(integer))
|
|
(pair
|
|
(keyword)
|
|
(integer))))))
|
|
|
|
=====================================
|
|
from arrow entries
|
|
=====================================
|
|
|
|
%{:a => 1, "b" => 2, c => 3}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(map_content
|
|
(binary_operator
|
|
(atom)
|
|
(integer))
|
|
(binary_operator
|
|
(string
|
|
(quoted_content))
|
|
(integer))
|
|
(binary_operator
|
|
(identifier)
|
|
(integer)))))
|
|
|
|
=====================================
|
|
from both arrow entries and keywords
|
|
=====================================
|
|
|
|
%{"a" => 1, b: 2, c: 3}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(map_content
|
|
(binary_operator
|
|
(string
|
|
(quoted_content))
|
|
(integer))
|
|
(keywords
|
|
(pair
|
|
(keyword)
|
|
(integer))
|
|
(pair
|
|
(keyword)
|
|
(integer))))))
|
|
|
|
=====================================
|
|
trailing separator
|
|
=====================================
|
|
|
|
%{"a" => 1,}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(map_content
|
|
(binary_operator
|
|
(string
|
|
(quoted_content))
|
|
(integer)))))
|
|
|
|
=====================================
|
|
update syntax
|
|
=====================================
|
|
|
|
%{user | name: "Jane", email: "jane@example.com"}
|
|
%{user | "name" => "Jane"}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(map_content
|
|
(binary_operator
|
|
(identifier)
|
|
(keywords
|
|
(pair
|
|
(keyword)
|
|
(string
|
|
(quoted_content)))
|
|
(pair
|
|
(keyword)
|
|
(string
|
|
(quoted_content)))))))
|
|
(map
|
|
(map_content
|
|
(binary_operator
|
|
(identifier)
|
|
(binary_operator
|
|
(string
|
|
(quoted_content))
|
|
(string
|
|
(quoted_content)))))))
|
|
|
|
=====================================
|
|
[error] ordering
|
|
=====================================
|
|
|
|
%{b: 2, c: 3, 1 => 1}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(ERROR
|
|
(keywords
|
|
(pair
|
|
(keyword)
|
|
(integer))
|
|
(pair
|
|
(keyword)
|
|
(integer))))
|
|
(map_content
|
|
(binary_operator
|
|
(integer)
|
|
(integer)))))
|
|
|
|
=====================================
|
|
[error] missing separator
|
|
=====================================
|
|
|
|
%{"a" => 1 "b" => 2}
|
|
|
|
---
|
|
|
|
(source
|
|
(map
|
|
(map_content
|
|
(binary_operator
|
|
(string
|
|
(quoted_content))
|
|
(ERROR (integer))
|
|
(binary_operator
|
|
(string
|
|
(quoted_content))
|
|
(integer))))))
|