fix:将while判断由!改为false
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Integration Test / Open-Set-Test (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Test canon project / Test-Canon (push) Has been cancelled
				
					
					
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Integration Test / Open-Set-Test (push) Has been cancelled
				Test canon project / Test-Canon (push) Has been cancelled
				同时去除了一条无用语句
This commit is contained in:
		@@ -791,7 +791,7 @@ public class CodeGeneratorVisitor(ICompilerLogger? logger = null) : TypeCheckVis
 | 
				
			|||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        // GenerateWhileLabel();
 | 
					                        // GenerateWhileLabel();
 | 
				
			||||||
                        Builder.AddLine($"""
 | 
					                        Builder.AddLine($"""
 | 
				
			||||||
                                         if (!{_whileConditionNames.Peek()})
 | 
					                                         if ({_whileConditionNames.Peek()} == false)
 | 
				
			||||||
                                             goto {_whileEndLabels.Peek()};
 | 
					                                             goto {_whileEndLabels.Peek()};
 | 
				
			||||||
                                         """);
 | 
					                                         """);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
@@ -1080,7 +1080,7 @@ public class CodeGeneratorVisitor(ICompilerLogger? logger = null) : TypeCheckVis
 | 
				
			|||||||
    private void GenerateWhileLabel()
 | 
					    private void GenerateWhileLabel()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        _whileBeginLabels.Push($"while_{_labelCount}");
 | 
					        _whileBeginLabels.Push($"while_{_labelCount}");
 | 
				
			||||||
        _whileConditionNames.Push($"while_condition_{_labelCount}");
 | 
					        //_whileConditionNames.Push($"while_condition_{_labelCount}");
 | 
				
			||||||
        _whileEndLabels.Push($"while_end_{_labelCount}");
 | 
					        _whileEndLabels.Push($"while_end_{_labelCount}");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        _labelCount += 1;
 | 
					        _labelCount += 1;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user