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
|
|
@ -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