34 lines
944 B
C#
34 lines
944 B
C#
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using PascalABCCompiler.SyntaxTree;
|
|
|
|
namespace PascalABCSavParser
|
|
{
|
|
public class ParserLambdaHelper
|
|
{
|
|
private int lambda_num = 0;
|
|
public List<function_lambda_definition> lambdaDefinitions;
|
|
public static string lambdaPrefix = "<>lambda";
|
|
|
|
public ParserLambdaHelper()
|
|
{
|
|
lambdaDefinitions = new List<function_lambda_definition>();
|
|
}
|
|
|
|
public string CreateLambdaName()
|
|
{
|
|
lambda_num++;
|
|
return lambdaPrefix + lambda_num.ToString();
|
|
}
|
|
|
|
public bool IsLambdaName(ident id)
|
|
{
|
|
return id.name.StartsWith(lambdaPrefix);
|
|
}
|
|
}
|
|
}
|