This commit is contained in:
miks1965 2018-07-19 10:12:46 +03:00
parent 692c2fa5fa
commit 3c02686700
7 changed files with 37 additions and 12 deletions

View file

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

View file

@ -1,4 +1,4 @@
%MINOR%=4
%REVISION%=1712
%REVISION%=1714
%COREVERSION%=0
%MAJOR%=3

Binary file not shown.

View file

@ -1 +1 @@
!define VERSION '3.4.0.1712'
!define VERSION '3.4.0.1714'

View file

@ -9376,6 +9376,9 @@ begin
Self[k, j] := a[j]
end;
/// Меняет строку k двумерного массива на другую строку
procedure SetRow<T>(Self: array [,] of T; k: integer; a: sequence of T); extensionmethod := Self.SetRow(k,a.ToArray);
/// Меняет столбец k двумерного массива на другой столбец
procedure SetCol<T>(Self: array [,] of T; k: integer; a: array of T); extensionmethod;
begin
@ -9385,6 +9388,9 @@ begin
Self[i, k] := a[i]
end;
/// Меняет столбец k двумерного массива на другой столбец
procedure SetCol<T>(Self: array [,] of T; k: integer; a: sequence of T); extensionmethod := Self.SetCol(k,a.ToArray);
/// Возвращает по заданному двумерному массиву последовательность (a[i,j],i,j)
function ElementsWithIndexes<T>(Self: array [,] of T): sequence of (T, integer, integer); extensionmethod;
begin

View file

@ -1005,15 +1005,38 @@ namespace SymbolTable
if (!scope.CaseSensitive)
Name = Name.ToLower();
CurrentScope = FromScope; //глобальные переменные могут привести к ошибкам при поиске и поторном вызове!
CurrentScope = FromScope; //глобальные переменные могут привести к ошибкам при поиске и повторном вызове!
List<SymbolInfo> Result = new List<SymbolInfo>();
// Находим имена с ? в стандартных местах. Это прежде всего ?System. Потом будет ?PABCSystem.
if (Name.Equals("?system"))
{
Name = Name.Substring(1);
// Нет. Как-то найти глобальное ПИ модуля
while (scope != null && !(scope is UnitInterfaceScope))
{
if (scope is ClassMethodScope)
scope = (scope as ClassMethodScope).DefScope;
else scope = scope.TopScope;
}
if (scope != null)
{
var a = (scope as UnitInterfaceScope).TopScopeArray.Where(x => x is PascalABCCompiler.NetHelper.NetScope).ToArray();
FindAllInAreaList(Name, a, true, Result);
}
if (Result.Count > 0)
return Result;
else return null;
}
Scope Area = scope;
Scope[] used_units = null;
HashTableNode tn = null;
if (!(scope is DotNETScope) && !Name.StartsWith("?"))
if (!(scope is DotNETScope))
{
Scope CurrentArea = Area;
while (CurrentArea != null)
@ -1105,11 +1128,6 @@ namespace SymbolTable
//если нет такого ищем в областях .NET
// SSM 21.01.16
if (Name.StartsWith("?")) // это значит, надо искать в областях .NET
Name = Name.Substring(1); // съели ? и ищем т.к. tn<0
// end SSM
//ssyy
Scope NextUnitArea = null;
//\ssyy
@ -1198,6 +1216,7 @@ namespace SymbolTable
else
Area = Area.TopScope;
//Area = Area.TopScope;
}
return null; //если такого нет то поиск окончен
}

View file

@ -3411,12 +3411,12 @@ namespace PascalABCCompiler.TreeConverter
}
var l = new List<ident>();
l.Add(new ident("?System"));
l.Add(new ident("?System")); // System не должно быть найдено в пользовательском коде
l.Add(new ident("Tuple"));
var tp = new template_param_list(lt);
// значит, это Tuple - создать его, обойти и выйти
var ttr = new SyntaxTree.template_type_reference(new named_type_reference(l), tp);
var ttr = new SyntaxTree.template_type_reference(new named_type_reference(l), tp, _enum_type_definition.source_context);
visit(ttr);
return;
}