@@ -269,7 +269,7 @@ def _generate_suggestion(error_node, code_text) -> str:
269
269
return "Please check the syntax near the error."
270
270
271
271
parent_type = parent .type
272
- if parent_type == 'content_clause ' :
272
+ if parent_type == 'content_literal ' :
273
273
return "Ensure the content block is properly enclosed with matching quotes (''' or \" \" )."
274
274
if parent_type == 'update_command' :
275
275
return "An action clause ('REPLACE', 'INSERT', 'DELETE') is expected in the 'UPDATE' command."
@@ -600,12 +600,12 @@ def parse_relative_indentation(self, node) -> int | None:
600
600
return int (self .find_first_by_type (node .named_children , 'number' ).text )
601
601
602
602
def parse_content (self , node ) -> str | tuple [Region , int | None ] | None :
603
- content = self .find_first_by_type (node .named_children , ['content_clause ' , 'content_from_segment' ])
603
+ content = self .find_first_by_type (node .named_children , ['content_literal ' , 'content_from_segment' ])
604
604
if not content :
605
605
return None
606
606
match content .type :
607
- case 'content_clause ' :
608
- return self .parse_content_clause (content ) # str
607
+ case 'content_literal ' :
608
+ return self .parse_content_literal (content ) # str
609
609
case 'content_from_segment' :
610
610
return self .parse_content_from_segment_clause (content ) # tuple[Region, int]
611
611
case _:
@@ -619,11 +619,11 @@ def parse_singlefile_clause(self, node):
619
619
raise ValueError ("No file_path found in singlefile_clause" )
620
620
return SingleFileClause (file_path = self .parse_string (path_node ))
621
621
622
- def parse_content_clause (self , node ) -> str :
622
+ def parse_content_literal (self , node ) -> str :
623
623
child_type = ['string' , 'relative_indent_block' , 'multiline_string' ]
624
624
content_node = self .find_first_by_type (node .children , child_type )
625
625
if content_node is None :
626
- raise ValueError ("No content found in content_clause " )
626
+ raise ValueError ("No content found in content_literal " )
627
627
if content_node .type == 'string' :
628
628
return self .parse_string (content_node )
629
629
elif content_node .type == 'relative_indent_block' :
0 commit comments