@@ -50,13 +50,13 @@ pub fn is_declarative_part(stream: &mut TokenStream, begin_is_end: bool) -> Pars
5050fn check_declarative_part ( token : & Token , may_end : bool , may_begin : bool ) -> ParseResult < ( ) > {
5151 match token. kind {
5252 Use | Type | Subtype | Shared | Constant | Signal | Variable | File | Component
53- | Attribute | Alias | Impure | Function | Procedure | Package | For => Ok ( ( ) ) ,
53+ | Attribute | Alias | Impure | Pure | Function | Procedure | Package | For => Ok ( ( ) ) ,
5454 Begin if may_begin => Ok ( ( ) ) ,
5555 End if may_end => Ok ( ( ) ) ,
5656 _ => {
5757 let decl_kinds = [
5858 Use , Type , Subtype , Shared , Constant , Signal , Variable , File , Component , Attribute ,
59- Alias , Impure , Function , Procedure , Package , For ,
59+ Alias , Impure , Pure , Function , Procedure , Package , For ,
6060 ] ;
6161
6262 Err ( token. kinds_error ( & decl_kinds) )
@@ -83,23 +83,23 @@ pub fn parse_declarative_part_leave_end_token(
8383
8484 fn is_recover_token ( kind : Kind ) -> bool {
8585 match kind {
86- Type | Subtype | Component | Impure | Function | Procedure | Package | For | File
87- | Shared | Constant | Signal | Variable | Attribute | Use | Alias => true ,
86+ Type | Subtype | Component | Impure | Pure | Function | Procedure | Package | For
87+ | File | Shared | Constant | Signal | Variable | Attribute | Use | Alias => true ,
8888 _ => false ,
8989 }
9090 } ;
9191
9292 while let Some ( token) = stream. peek ( ) ? {
9393 match token. kind {
9494 Begin | End => break ,
95- Type | Subtype | Component | Impure | Function | Procedure | Package | For => {
95+ Type | Subtype | Component | Impure | Pure | Function | Procedure | Package | For => {
9696 let decl = match token. kind {
9797 Type | Subtype => {
9898 parse_type_declaration ( stream, diagnostics) . map ( Declaration :: Type ) ?
9999 }
100100 Component => parse_component_declaration ( stream, diagnostics)
101101 . map ( Declaration :: Component ) ?,
102- Impure | Function | Procedure => parse_subprogram ( stream, diagnostics) ?,
102+ Impure | Pure | Function | Procedure => parse_subprogram ( stream, diagnostics) ?,
103103 Package => parse_package_instantiation ( stream) . map ( Declaration :: Package ) ?,
104104 For => {
105105 parse_configuration_specification ( stream) . map ( Declaration :: Configuration ) ?
@@ -145,8 +145,8 @@ pub fn parse_declarative_part_leave_end_token(
145145
146146 _ => {
147147 diagnostics. push ( token. kinds_error ( & [
148- Type , Subtype , Component , Impure , Function , Procedure , Package , For , File ,
149- Shared , Constant , Signal , Variable , Attribute , Use , Alias ,
148+ Type , Subtype , Component , Impure , Pure , Function , Procedure , Package , For ,
149+ File , Shared , Constant , Signal , Variable , Attribute , Use , Alias ,
150150 ] ) ) ;
151151 stream. skip_until ( is_recover_token) ?;
152152 continue ;
@@ -232,7 +232,7 @@ constant x: natural := 5;
232232 msgs,
233233 vec![ Diagnostic :: error(
234234 code. s1( "var" ) . pos( ) ,
235- "Expected 'type', 'subtype', 'component', 'impure', \
235+ "Expected 'type', 'subtype', 'component', 'impure', 'pure', \
236236 'function', 'procedure', 'package', 'for', 'file', \
237237 'shared', 'constant', 'signal', 'variable', 'attribute', \
238238 'use' or 'alias'"
0 commit comments