diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 1d2e35657..6a82daa57 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 = "3"; - public const string Revision = "3147"; + public const string Revision = "3150"; 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 b6dfc4340..dd4605542 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=8 -%REVISION%=3147 %COREVERSION%=3 +%REVISION%=3150 +%MINOR%=8 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index e83f41b67..be043f159 100644 Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 96c7ed8fe..3dcef80cc 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.8.3.3147 +3.8.3.3150 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index bb64c6b4a..008c714bf 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.8.3.3147' +!define VERSION '3.8.3.3150' diff --git a/SyntaxTree/tree/HierarchyVisitor.cs b/SyntaxTree/tree/HierarchyVisitor.cs index 8335a0d2a..d289a5608 100644 --- a/SyntaxTree/tree/HierarchyVisitor.cs +++ b/SyntaxTree/tree/HierarchyVisitor.cs @@ -3910,6 +3910,7 @@ namespace PascalABCCompiler.SyntaxTree { DefaultVisit(_yield_unknown_ident); pre_do_visit(_yield_unknown_ident); + visit(yield_unknown_ident.UnknownID); post_do_visit(_yield_unknown_ident); } diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index fe03e07d1..13bf30ed0 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -3878,6 +3878,7 @@ namespace PascalABCCompiler.SyntaxTree public void read_yield_unknown_ident(yield_unknown_ident _yield_unknown_ident) { read_ident(_yield_unknown_ident); + _yield_unknown_ident.UnknownID = _read_node() as ident; } diff --git a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs index baac8a166..1ddbd0a2f 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs @@ -5990,6 +5990,15 @@ namespace PascalABCCompiler.SyntaxTree public void write_yield_unknown_ident(yield_unknown_ident _yield_unknown_ident) { write_ident(_yield_unknown_ident); + if (_yield_unknown_ident.UnknownID == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _yield_unknown_ident.UnknownID.visit(this); + } } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index fba02008c..b99569ba3 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -46350,31 +46350,70 @@ namespace PascalABCCompiler.SyntaxTree } - /// ///Конструктор с параметрами. /// - public yield_unknown_ident(string _name) + public yield_unknown_ident(ident _UnknownID) { - this._name=_name; + this._UnknownID=_UnknownID; FillParentsInDirectChilds(); } /// ///Конструктор с параметрами. /// - public yield_unknown_ident(string _name,SourceContext sc) + public yield_unknown_ident(ident _UnknownID,SourceContext sc) { - this._name=_name; + this._UnknownID=_UnknownID; source_context = sc; FillParentsInDirectChilds(); } + + /// + ///Конструктор с параметрами. + /// + public yield_unknown_ident(string _name,ident _UnknownID) + { + this._name=_name; + this._UnknownID=_UnknownID; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public yield_unknown_ident(string _name,ident _UnknownID,SourceContext sc) + { + this._name=_name; + this._UnknownID=_UnknownID; + source_context = sc; + FillParentsInDirectChilds(); + } + protected ident _UnknownID; + + /// + /// + /// + public ident UnknownID + { + get + { + return _UnknownID; + } + set + { + _UnknownID=value; + if (_UnknownID != null) + _UnknownID.Parent = this; + } + } + + /// Создает копию узла public override syntax_tree_node Clone() { yield_unknown_ident copy = new yield_unknown_ident(); copy.Parent = this.Parent; - copy.UnknownID = this.UnknownID; if (source_context != null) copy.source_context = new SourceContext(source_context); if (attributes != null) @@ -46383,6 +46422,11 @@ namespace PascalABCCompiler.SyntaxTree copy.attributes.Parent = copy; } copy.name = name; + if (UnknownID != null) + { + copy.UnknownID = (ident)UnknownID.Clone(); + copy.UnknownID.Parent = copy; + } return copy; } @@ -46397,6 +46441,8 @@ namespace PascalABCCompiler.SyntaxTree { if (attributes != null) attributes.Parent = this; + if (UnknownID != null) + UnknownID.Parent = this; } /// Заполняет поля Parent во всем поддереве @@ -46404,6 +46450,7 @@ namespace PascalABCCompiler.SyntaxTree { FillParentsInDirectChilds(); attributes?.FillParentsInAllChilds(); + UnknownID?.FillParentsInAllChilds(); } /// @@ -46413,7 +46460,7 @@ namespace PascalABCCompiler.SyntaxTree { get { - return 0; + return 1; } } /// @@ -46423,7 +46470,7 @@ namespace PascalABCCompiler.SyntaxTree { get { - return 0; + return 1; } } /// @@ -46435,12 +46482,23 @@ namespace PascalABCCompiler.SyntaxTree { if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + return UnknownID; + } return null; } set { if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + UnknownID = (ident)value; + break; + } } } /// diff --git a/SyntaxTree/tree/TreeHelper.cs b/SyntaxTree/tree/TreeHelper.cs index 608ed9740..97accf960 100644 --- a/SyntaxTree/tree/TreeHelper.cs +++ b/SyntaxTree/tree/TreeHelper.cs @@ -1588,15 +1588,15 @@ namespace PascalABCCompiler.SyntaxTree public partial class yield_unknown_ident : ident { - protected ident _UnknownID; + //protected ident _UnknownID; protected ident _ClassName; protected bool _IsYieldInStaticMethod; - public ident UnknownID + /*public ident UnknownID { get { return _UnknownID; } set { _UnknownID = value; } - } + }*/ public ident ClassName { diff --git a/SyntaxTree/tree/tree.xml b/SyntaxTree/tree/tree.xml index e0a1b1dc9..831e78740 100644 --- a/SyntaxTree/tree/tree.xml +++ b/SyntaxTree/tree/tree.xml @@ -2757,7 +2757,9 @@ - + + + @@ -4944,6 +4946,7 @@ + diff --git a/TestSuite/CompilationSamples/DMTaskMaker.pas b/TestSuite/CompilationSamples/DMTaskMaker.pas index 12667df47..e01376997 100644 --- a/TestSuite/CompilationSamples/DMTaskMaker.pas +++ b/TestSuite/CompilationSamples/DMTaskMaker.pas @@ -1,8 +1,8 @@ -// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt) +// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) unit DMTaskMaker; -interface +interface uses System.Collections.Generic;