pascalabcnet/Parsers/PascalABCParserNewSaushkin/ParserLambdaHelper.cs
Александр Земляк 1f4b44c2c0
Исправление ошибок при перекомпиляции pcu файлов (#3398)
* Move yield string constants to StringConstants class

* Add GeneratedNamesManager class to store all generated names during unit compilation

* Make GeneratedNamesManager class non static

* Add Utils project to installer files

* Add GeneratedNamesManager usage in CapturedVariablesSubstitutionsManager

* Move GeneratedNamesManager initialization in CompilationUnit constructor

* More GeneratedNamesManager usage

* QuestionPointDesugarVisitor fix
2026-03-08 18:30:33 +03:00

26 lines
903 B
C#

// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System.Collections.Generic;
using PascalABCCompiler;
using PascalABCCompiler.SyntaxTree;
using PascalABCCompiler.CoreUtils;
namespace Languages.Pascal.Frontend.Core
{
public class ParserLambdaHelper
{
private readonly GeneratedNamesManager generatedNamesManager = new GeneratedNamesManager();
public List<function_lambda_definition> lambdaDefinitions = new List<function_lambda_definition>();
public string CreateLambdaName()
{
return generatedNamesManager.GenerateName(StringConstants.lambdaPrefix);
}
public bool IsLambdaName(ident id)
{
return id.name.StartsWith(StringConstants.lambdaPrefix);
}
}
}