mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Fix parsing inner class declaration when "pass" keyword is on the same line
Implement a special case for allowing "pass" keyword in one-liner class declaration, to be consistent with Python style. ``` class TestClass: pass ``` This commit fixes #56703
This commit is contained in:
		
							parent
							
								
									3c35617c50
								
							
						
					
					
						commit
						5bcc3d476c
					
				
					 2 changed files with 62 additions and 19 deletions
				
			
		|  | @ -599,6 +599,9 @@ private: | |||
| 
 | ||||
| 	bool _parse_arguments(Node *p_parent, Vector<Node *> &p_args, bool p_static, bool p_can_codecomplete = false, bool p_parsing_constant = false); | ||||
| 	bool _enter_indent_block(BlockNode *p_block = nullptr); | ||||
| 	bool _enter_inner_class_indent_block(); | ||||
| 	bool _parse_colon(); | ||||
| 	bool _parse_indent_block_newlines(BlockNode *p_block = nullptr); | ||||
| 	bool _parse_newline(); | ||||
| 	Node *_parse_expression(Node *p_parent, bool p_static, bool p_allow_assign = false, bool p_parsing_constant = false); | ||||
| 	Node *_reduce_expression(Node *p_node, bool p_to_const = false); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kirill Diduk
						Kirill Diduk