From e4a0a33d3e9d0c1646df2738763bcb077aa339ba Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Sat, 19 Jun 2021 12:33:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20var=20(x,y)=20:=3D=20a[1:3];?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- SyntaxTreeConverters/StandardSyntaxConverter.cs | 6 +++--- TestSuite/var_tuple_and_slice.pas | 5 +++++ 6 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 TestSuite/var_tuple_and_slice.pas diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 2944d6bb1..d6ff95eb1 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "8"; public const string Build = "0"; - public const string Revision = "2899"; + public const string Revision = "2901"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 1e9447612..bb40dfdc4 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=8 -%REVISION%=2899 +%REVISION%=2901 %COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index c3922ebfc..19d97cbcd 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.8.0.2899 +3.8.0.2901 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index e4ce9764b..0f2576390 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.8.0.2899' +!define VERSION '3.8.0.2901' diff --git a/SyntaxTreeConverters/StandardSyntaxConverter.cs b/SyntaxTreeConverters/StandardSyntaxConverter.cs index ce78a668a..524e21594 100644 --- a/SyntaxTreeConverters/StandardSyntaxConverter.cs +++ b/SyntaxTreeConverters/StandardSyntaxConverter.cs @@ -53,12 +53,12 @@ namespace PascalABCCompiler.SyntaxTreeConverters // index IndexVisitor.New.ProcessNode(root); + // slice_expr и slice_expr_question + SliceDesugarVisitor.New.ProcessNode(root); // поставил раньше AssignTuplesDesugarVisitor из за var (a,b) := a[1:3]; + // assign_tuple и assign_var_tuple AssignTuplesDesugarVisitor.New.ProcessNode(root); // теперь это - на семантике - // slice_expr и slice_expr_question - SliceDesugarVisitor.New.ProcessNode(root); - // question_point_desugar_visitor QuestionPointDesugarVisitor.New.ProcessNode(root); diff --git a/TestSuite/var_tuple_and_slice.pas b/TestSuite/var_tuple_and_slice.pas new file mode 100644 index 000000000..491a700d1 --- /dev/null +++ b/TestSuite/var_tuple_and_slice.pas @@ -0,0 +1,5 @@ +begin + var a := Arr(1,2,3); + var (k,m) := a[1:3]; + Assert((k=2) and (m=3)); +end. \ No newline at end of file