Add 'type_identifier' alias

This is more appropriate, and actually closer to the specified grammar.
This commit is contained in:
Bruno BELANYI 2022-06-03 10:15:37 +02:00
parent 6e40691a35
commit 2be5056793
6 changed files with 140 additions and 86 deletions

View file

@ -8,7 +8,7 @@ array_of_int[42] of 0
(source_file
(array_expression
type: (identifier)
type: (type_identifier)
size: (integer_literal)
init: (integer_literal)))
@ -22,10 +22,10 @@ array_of_array_of_int[12] of array_of_int[27] of 0
(source_file
(array_expression
type: (identifier)
type: (type_identifier)
size: (integer_literal)
init: (array_expression
type: (identifier)
type: (type_identifier)
size: (integer_literal)
init: (integer_literal))))
@ -39,7 +39,7 @@ record_type { a = 12, b = "27" }
(source_file
(record_expression
type: (identifier)
type: (type_identifier)
field: (identifier)
init: (integer_literal)
field: (identifier)
@ -55,7 +55,7 @@ record_type { a = 12 }
(source_file
(record_expression
type: (identifier)
type: (type_identifier)
field: (identifier)
init: (integer_literal)))
@ -69,7 +69,7 @@ record_type {}
(source_file
(record_expression
type: (identifier)))
type: (type_identifier)))
================================================================================
Record expression trailing comma
@ -81,7 +81,7 @@ record_type { a = 12, }
(source_file
(record_expression
type: (identifier)
type: (type_identifier)
field: (identifier)
init: (integer_literal)
(ERROR)))