A task type can contain pragmas

Not shown in the RM grammar, but explicit in 2.8
This commit is contained in:
Emmanuel Briot 2022-12-14 12:31:33 +01:00
parent 7b4bf400ab
commit dbd3401b14
5 changed files with 9991 additions and 9905 deletions

View File

@ -1806,6 +1806,7 @@ module.exports = grammar({
_task_item: $ => choice(
$.entry_declaration,
$._aspect_clause,
$.pragma_g,
),
task_definition: $ => seq( // RM 9.1
repeat($._task_item),

View File

@ -10843,6 +10843,10 @@
{
"type": "SYMBOL",
"name": "_aspect_clause"
},
{
"type": "SYMBOL",
"name": "pragma_g"
}
]
},

View File

@ -10806,6 +10806,10 @@
"type": "enumeration_representation_clause",
"named": true
},
{
"type": "pragma_g",
"named": true
},
{
"type": "record_representation_clause",
"named": true

19859
src/parser.c

File diff suppressed because it is too large Load Diff

View File

@ -60,3 +60,31 @@ end;
(pragma_g
(identifier))
(null_statement)))))
================================================================================
pragma in tasks
================================================================================
package P is
task type T is
pragma Storage_Size (1024);
end T;
end;
--------------------------------------------------------------------------------
(compilation
(compilation_unit
(package_specification
(identifier)
(full_type_declaration
(task_type_declaration
(identifier)
(task_definition
(pragma_g
(identifier)
(pragma_argument_association
(expression
(term
(numeric_literal)))))
(identifier)))))))