Исправлена ошибка с x[1:^1][5]
This commit is contained in:
parent
1c1981e1ec
commit
dc95f368d7
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "9";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "3295";
|
||||
public const string Revision = "3296";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=9
|
||||
%REVISION%=3295
|
||||
%COREVERSION%=0
|
||||
%REVISION%=3296
|
||||
%MINOR%=9
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
3.9.0.3295
|
||||
3.9.0.3296
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.9.0.3295'
|
||||
!define VERSION '3.9.0.3296'
|
||||
|
|
|
|||
|
|
@ -35,8 +35,13 @@ namespace SyntaxVisitors.SugarVisitors
|
|||
ind.source_context);
|
||||
syntax_tree_node mc = null;
|
||||
var possibleIndexer = ind.Parent?.Parent;
|
||||
if (ind.Parent != null && !(ind.Parent is expression_list))
|
||||
possibleIndexer = null;
|
||||
if (possibleIndexer != null && possibleIndexer is indexer indexer)
|
||||
{
|
||||
// x[1:^1][5] - не должно сюда заходить в этом случае !!! Но неожиданно possibleIndexer оказывается expr[5]
|
||||
// Сюда должно заходить только при x[^1,3]. То есть, ind.Parent д.б. expression_list и только в этом случае!!!
|
||||
|
||||
// Надо подняться до узла indexer и запомнить индекс, под которым данный index входит
|
||||
// Идём по Parent - и смотрим, когда Parent = indexer
|
||||
// Находим у него expressions и ищем, под каким индексом в нем содержится текущий.
|
||||
|
|
|
|||
4
TestSuite/sl_ind.pas
Normal file
4
TestSuite/sl_ind.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
begin
|
||||
var x:=|1,2,3,4,5,6,7,8,9,10|;
|
||||
Assert(x[1:^1][5] = 7);
|
||||
end.
|
||||
Loading…
Reference in a new issue