Add 'property' alias
It makes the syntax tree more readable.
This commit is contained in:
parent
644f6483fe
commit
2549f6f0db
6 changed files with 210 additions and 284 deletions
|
|
@ -246,8 +246,9 @@ foo = {foo:42}
|
|||
(assignment
|
||||
(identifier)
|
||||
(map_expression
|
||||
(identifier)
|
||||
(integer_literal))))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal)))))
|
||||
|
||||
================================================================================
|
||||
Map (singleton multiline)
|
||||
|
|
@ -263,8 +264,9 @@ foo = {
|
|||
(assignment
|
||||
(identifier)
|
||||
(map_expression
|
||||
(identifier)
|
||||
(integer_literal))))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal)))))
|
||||
|
||||
================================================================================
|
||||
Map (singleton trailing comma)
|
||||
|
|
@ -280,8 +282,9 @@ foo = {
|
|||
(assignment
|
||||
(identifier)
|
||||
(map_expression
|
||||
(identifier)
|
||||
(integer_literal))))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal)))))
|
||||
|
||||
================================================================================
|
||||
Map (mixed values)
|
||||
|
|
@ -298,10 +301,12 @@ foo = {
|
|||
(assignment
|
||||
(identifier)
|
||||
(map_expression
|
||||
(identifier)
|
||||
(integer_literal)
|
||||
(identifier)
|
||||
(interpreted_string_literal))))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal))
|
||||
(property
|
||||
(identifier)
|
||||
(interpreted_string_literal)))))
|
||||
|
||||
================================================================================
|
||||
Map (map of map)
|
||||
|
|
@ -317,10 +322,12 @@ foo = {
|
|||
(assignment
|
||||
(identifier)
|
||||
(map_expression
|
||||
(identifier)
|
||||
(map_expression
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal)))))
|
||||
(map_expression
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal)))))))
|
||||
|
||||
================================================================================
|
||||
Map (rogue comma)
|
||||
|
|
|
|||
|
|
@ -36,8 +36,9 @@ foo {
|
|||
(source_file
|
||||
(module
|
||||
(identifier)
|
||||
(identifier)
|
||||
(integer_literal)))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal))))
|
||||
|
||||
================================================================================
|
||||
Single property (trailing comma)
|
||||
|
|
@ -52,8 +53,9 @@ foo {
|
|||
(source_file
|
||||
(module
|
||||
(identifier)
|
||||
(identifier)
|
||||
(integer_literal)))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal))))
|
||||
|
||||
================================================================================
|
||||
Mixed values
|
||||
|
|
@ -70,12 +72,15 @@ foo {
|
|||
(source_file
|
||||
(module
|
||||
(identifier)
|
||||
(identifier)
|
||||
(boolean_literal)
|
||||
(identifier)
|
||||
(interpreted_string_literal)
|
||||
(identifier)
|
||||
(integer_literal)))
|
||||
(property
|
||||
(identifier)
|
||||
(boolean_literal))
|
||||
(property
|
||||
(identifier)
|
||||
(interpreted_string_literal))
|
||||
(property
|
||||
(identifier)
|
||||
(integer_literal))))
|
||||
|
||||
================================================================================
|
||||
Complex value
|
||||
|
|
@ -94,11 +99,13 @@ foo {
|
|||
(source_file
|
||||
(module
|
||||
(identifier)
|
||||
(identifier)
|
||||
(list_expression
|
||||
(map_expression
|
||||
(identifier)
|
||||
(interpreted_string_literal)))))
|
||||
(property
|
||||
(identifier)
|
||||
(list_expression
|
||||
(map_expression
|
||||
(property
|
||||
(identifier)
|
||||
(interpreted_string_literal)))))))
|
||||
|
||||
================================================================================
|
||||
Rogue comma
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue