diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 4ab2e947a..e16543138 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 = "7"; public const string Build = "1"; - public const string Revision = "2699"; + public const string Revision = "2709"; 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 f99847607..eb3d9bf97 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=7 -%REVISION%=2699 +%REVISION%=2709 %COREVERSION%=1 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index dc9e7292f..06df8f4c9 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: DESKTOP-G8V08V4 -// DateTime: 16.09.2020 11:10:05 +// DateTime: 01.10.2020 18:49:53 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index d407dc068..e16bcf6e0 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-G8V08V4 -// DateTime: 16.09.2020 11:10:06 +// DateTime: 01.10.2020 18:49:54 // UserName: ????????? // Input file diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index ea5f27e0e..d6c340bf1 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.7.1.2699 +3.7.1.2709 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index c53761085..4e6cb1168 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.7.1.2699' +!define VERSION '3.7.1.2709' diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index e8589c8e1..954ea169c 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -640,17 +640,22 @@ namespace PascalABCCompiler.TreeConverter public location get_location(SyntaxTree.syntax_tree_node tn) { - if (tn == null) - return null; - if (tn.source_context == null) + var tnn = tn; + /*while (tnn.source_context == null && tnn.Parent != null) { - return get_location(tn.Parent); + tnn = tnn.Parent; + }*/ + var tns = tnn.source_context; + + if (tns == null) + { + return null; } document d = current_document; - if (tn.source_context.FileName != null && (d == null || d.file_name != tn.source_context.FileName)) - d = new document(tn.source_context.FileName); - return new location(tn.source_context.begin_position.line_num, tn.source_context.begin_position.column_num, - tn.source_context.end_position.line_num, tn.source_context.end_position.column_num, d); + if (tns.FileName != null && (d == null || d.file_name != tns.FileName)) + d = new document(tns.FileName); + return new location(tns.begin_position.line_num, tns.begin_position.column_num, + tns.end_position.line_num, tns.end_position.column_num, d); } public location get_right_location(SyntaxTree.syntax_tree_node tn) { @@ -1699,6 +1704,11 @@ namespace PascalABCCompiler.TreeConverter check_possible_generic_names(names, loc); } var lastname = names.names[names.names.Count - 1]; + syntax_tree_node l = lastname; + while (l.source_context == null && l.Parent != null) + l = l.Parent; + + lastname.source_context = l?.source_context; di = context.check_name_node_type(lastname.name, sil?.FirstOrDefault(), get_location(lastname), general_node_type.type_node); return (type_node)di; }