Переименованы функции Replace и FindIndex для списков в синтаксических узлах

This commit is contained in:
Alexander Zakharenko 2016-05-24 16:58:07 +03:00
parent 0793bfd6a3
commit 38a9e9f2b5
8 changed files with 226 additions and 226 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "1";
public const string Build = "0";
public const string Revision = "1246";
public const string Revision = "1251";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=1
%REVISION%=1246
%COREVERSION%=0
%REVISION%=1251
%MINOR%=1
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.1.0.1246'
!define VERSION '3.1.0.1251'

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -263,7 +263,7 @@ namespace NodeGenerator
}
";
public static readonly string list_find_index_method =
@" private int FindIndex(list_element_type el)
@" private int FindIndexInList(list_element_type el)
{
var ind = list_name.FindIndex(x => x == el);
if (ind == -1)
@ -272,15 +272,15 @@ namespace NodeGenerator
}
";
public static readonly string list_replace_method =
@" public void Replace(list_element_type el, list_element_type newel)
@" public void ReplaceInList(list_element_type el, list_element_type newel)
{
list_name[FindIndex(el)] = newel;
list_name[FindIndexInList(el)] = newel;
}
";
public static readonly string list_replace_many_method =
@" public void Replace(list_element_type el, IEnumerable<list_element_type> newels)
@" public void ReplaceInList(list_element_type el, IEnumerable<list_element_type> newels)
{
var ind = FindIndex(el);
var ind = FindIndexInList(el);
list_name.RemoveAt(ind);
list_name.InsertRange(ind, newels);
}

View file

@ -89,13 +89,13 @@ namespace SyntaxVisitors
public void ReplaceStatement(statement from, statement to)
{
var stl = UpperNodeAs<statement_list>();
stl.Replace(from, to);
stl.ReplaceInList(from, to);
}
public void ReplaceStatement(statement from, IEnumerable<statement> to)
{
var stl = UpperNodeAs<statement_list>();
stl.Replace(from, to);
stl.ReplaceInList(from, to);
}
}

Binary file not shown.