diff --git a/CodeCompletion/CodeFormatter.cs b/CodeCompletion/CodeFormatter.cs index 47050a357..a20202da7 100644 --- a/CodeCompletion/CodeFormatter.cs +++ b/CodeCompletion/CodeFormatter.cs @@ -3466,7 +3466,7 @@ namespace CodeFormatters public override void visit(array_const_new acn) { - sb.Append("|"); + sb.Append(acn.braces_type); visit_node(acn.elements); //sb.Append("|"); } diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 5671ee101..75e197dfa 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 = "10"; public const string Build = "2"; - public const string Revision = "3595"; + public const string Revision = "3596"; 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 e56660243..bd7d56bf1 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=10 -%REVISION%=3595 %COREVERSION%=2 +%REVISION%=3596 +%MINOR%=10 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 176a3b02c..f39b4f1f1 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: LAPTOP-TE3HP881 -// DateTime: 15.12.2024 8:40:15 +// DateTime: 04.01.2025 22:10:06 // UserName: miks // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 63b39feed..e68df1fa8 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -1000,7 +1000,7 @@ pascal_set_const is_set = true; if (is_set) $$ = new pascal_set_constant($2 as expression_list, @$); - else $$ = new array_const_new($2 as expression_list, @$); + else $$ = new array_const_new($2 as expression_list, '[', @$); } ; @@ -1011,7 +1011,7 @@ const_set } | tkVertParen elem_list tkVertParen { - $$ = new array_const_new($2 as expression_list, @$); + $$ = new array_const_new($2 as expression_list, '|', @$); } ; @@ -4461,7 +4461,7 @@ variable } | tkVertParen elem_list tkVertParen { - $$ = new array_const_new($2 as expression_list, @$); + $$ = new array_const_new($2 as expression_list, '|', @$); } | pascal_set_const { diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 396a29ae4..3f4ae9490 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: LAPTOP-TE3HP881 -// DateTime: 15.12.2024 8:40:16 +// DateTime: 04.01.2025 22:10:07 // UserName: miks // Input file @@ -3678,7 +3678,7 @@ public partial class GPPGParser: ShiftReduceParser pascal_set_const @@ -3688,7 +3688,7 @@ public partial class GPPGParser: ShiftReduceParser tkVertParen, elem_list, tkVertParen { - CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); + CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, '|', CurrentLocationSpan); } break; case 167: // sign -> tkPlus @@ -6954,7 +6954,7 @@ public partial class GPPGParser: ShiftReduceParser tkVertParen, elem_list, tkVertParen { - CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); + CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, '|', CurrentLocationSpan); } break; case 804: // variable -> pascal_set_const diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index f5286f9ff..9bd834b18 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -390,5 +390,6 @@ script= + diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index eb52240dc..b8a44a2c0 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.10.2.3595 +3.10.2.3596 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 6861012f2..c917b3c22 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.10.2.3595' +!define VERSION '3.10.2.3596' diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index f82a3d743..1b4688257 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -4459,6 +4459,7 @@ namespace PascalABCCompiler.SyntaxTree { read_addressed_value(_array_const_new); _array_const_new.elements = _read_node() as expression_list; + _array_const_new.braces_type = br.ReadChar(); } diff --git a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs index 034beb322..9b7b9ea7d 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs @@ -6953,6 +6953,7 @@ namespace PascalABCCompiler.SyntaxTree bw.Write((byte)1); _array_const_new.elements.visit(this); } + bw.Write(_array_const_new.braces_type); } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index a4e94fbdd..f7cd2a4e8 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -54152,22 +54152,25 @@ namespace PascalABCCompiler.SyntaxTree /// ///Конструктор с параметрами. /// - public array_const_new(expression_list _elements) + public array_const_new(expression_list _elements,char _braces_type) { this._elements=_elements; + this._braces_type=_braces_type; FillParentsInDirectChilds(); } /// ///Конструктор с параметрами. /// - public array_const_new(expression_list _elements,SourceContext sc) + public array_const_new(expression_list _elements,char _braces_type,SourceContext sc) { this._elements=_elements; + this._braces_type=_braces_type; source_context = sc; FillParentsInDirectChilds(); } protected expression_list _elements; + protected char _braces_type; /// /// @@ -54186,6 +54189,21 @@ namespace PascalABCCompiler.SyntaxTree } } + /// + /// + /// + public char braces_type + { + get + { + return _braces_type; + } + set + { + _braces_type=value; + } + } + /// Создает копию узла public override syntax_tree_node Clone() @@ -54204,6 +54222,7 @@ namespace PascalABCCompiler.SyntaxTree copy.elements = (expression_list)elements.Clone(); copy.elements.Parent = copy; } + copy.braces_type = braces_type; return copy; } diff --git a/SyntaxTree/tree/tree.xml b/SyntaxTree/tree/tree.xml index 7360c3bdb..cf410d8ff 100644 --- a/SyntaxTree/tree/tree.xml +++ b/SyntaxTree/tree/tree.xml @@ -3276,6 +3276,7 @@ + @@ -3552,6 +3553,7 @@ +