Незначительные правки
This commit is contained in:
parent
b9d5c25c81
commit
e959c17d07
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=7
|
||||
%REVISION%=2699
|
||||
%REVISION%=2709
|
||||
%COREVERSION%=1
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -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 <ABCPascal.lex>
|
||||
// GPLEX frame file <embedded resource>
|
||||
|
|
|
|||
|
|
@ -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 <ABCPascal.y>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.7.1.2699
|
||||
3.7.1.2709
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.7.1.2699'
|
||||
!define VERSION '3.7.1.2709'
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue