@@ -69,7 +69,7 @@ impl Parser {
6969 self . start_node ( ConcurrentStatements ) ;
7070 loop {
7171 match self . peek_token ( ) {
72- Some ( Keyword ( Kw :: End | Kw :: Elsif | Kw :: Else | Kw :: When ) ) | None => {
72+ Keyword ( Kw :: End | Kw :: Elsif | Kw :: Else | Kw :: When ) | Eof => {
7373 break ;
7474 }
7575 _ => self . concurrent_statement ( ) ,
@@ -99,7 +99,7 @@ impl Parser {
9999 self . end_node ( ) ;
100100 }
101101
102- fn peek_concurrent_statement_kind ( & mut self ) -> Option < TokenKind > {
102+ fn peek_concurrent_statement_kind ( & mut self ) -> TokenKind {
103103 // Has label?
104104 let mut peek_idx = 0usize ;
105105 if self . next_is ( Identifier ) && self . next_nth_is ( Colon , 1 ) {
@@ -114,8 +114,8 @@ impl Parser {
114114
115115 pub fn instantiated_unit ( & mut self ) {
116116 match self . peek_token ( ) {
117- Some ( Keyword ( Kw :: Entity ) ) => self . entity_instantiated_unit ( ) ,
118- Some ( Keyword ( Kw :: Configuration ) ) => self . configuration_instantiated_unit ( ) ,
117+ Keyword ( Kw :: Entity ) => self . entity_instantiated_unit ( ) ,
118+ Keyword ( Kw :: Configuration ) => self . configuration_instantiated_unit ( ) ,
119119 _ => self . component_instantiated_unit ( ) ,
120120 }
121121 }
@@ -140,24 +140,24 @@ impl Parser {
140140
141141 pub ( crate ) fn concurrent_statement ( & mut self ) {
142142 match self . peek_concurrent_statement_kind ( ) {
143- Some ( Keyword ( Kw :: Block ) ) => self . block_statement ( ) ,
144- Some ( Keyword ( Kw :: Process ) ) => self . process_statement ( ) ,
145- Some ( Keyword ( Kw :: Component | Kw :: Configuration | Kw :: Entity ) ) => {
143+ Keyword ( Kw :: Block ) => self . block_statement ( ) ,
144+ Keyword ( Kw :: Process ) => self . process_statement ( ) ,
145+ Keyword ( Kw :: Component | Kw :: Configuration | Kw :: Entity ) => {
146146 self . component_instantiation_statement ( )
147147 }
148- Some ( Keyword ( Kw :: For ) ) => self . for_generate_statement ( ) ,
149- Some ( Keyword ( Kw :: If ) ) => self . if_generate_statement ( ) ,
150- Some ( Keyword ( Kw :: Case ) ) => self . case_generate_statement ( ) ,
151- Some ( Keyword ( Kw :: Assert ) ) => self . concurrent_assertion_statement ( ) ,
152- Some ( Keyword ( Kw :: With ) ) => self . concurrent_selected_signal_assignment ( ) ,
153- Some ( Identifier | LtLt | StringLiteral | CharacterLiteral ) => {
148+ Keyword ( Kw :: For ) => self . for_generate_statement ( ) ,
149+ Keyword ( Kw :: If ) => self . if_generate_statement ( ) ,
150+ Keyword ( Kw :: Case ) => self . case_generate_statement ( ) ,
151+ Keyword ( Kw :: Assert ) => self . concurrent_assertion_statement ( ) ,
152+ Keyword ( Kw :: With ) => self . concurrent_selected_signal_assignment ( ) ,
153+ Identifier | LtLt | StringLiteral | CharacterLiteral => {
154154 let checkpoint = self . checkpoint ( ) ;
155155 self . opt_label ( ) ;
156156 self . opt_token ( Keyword ( Kw :: Postponed ) ) ;
157157 let checkpoint2 = self . checkpoint ( ) ;
158158 self . name ( ) ;
159159 match self . peek_token ( ) {
160- Some ( LTE ) => {
160+ LTE => {
161161 self . start_node_at ( checkpoint2, NameTarget ) ;
162162 self . end_node ( ) ;
163163 self . skip ( ) ;
@@ -174,7 +174,7 @@ impl Parser {
174174 self . start_node_at ( checkpoint, ConcurrentSimpleSignalAssignment ) ;
175175 }
176176 }
177- Some ( Keyword ( Kw :: Port | Kw :: Generic ) ) => {
177+ Keyword ( Kw :: Port | Kw :: Generic ) => {
178178 self . start_node_at ( checkpoint2, ComponentInstantiatedUnit ) ;
179179 self . end_node ( ) ;
180180 self . start_node_at ( checkpoint, ComponentInstantiationStatement ) ;
0 commit comments