Merge branch 'master' of github.com:pascalabcnet/pascalabcnet
This commit is contained in:
commit
76a7e8e4cf
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
||||||
public const string Major = "3";
|
public const string Major = "3";
|
||||||
public const string Minor = "6";
|
public const string Minor = "6";
|
||||||
public const string Build = "3";
|
public const string Build = "3";
|
||||||
public const string Revision = "2486";
|
public const string Revision = "2487";
|
||||||
|
|
||||||
public const string MainVersion = Major + "." + Minor;
|
public const string MainVersion = Major + "." + Minor;
|
||||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%COREVERSION%=3
|
|
||||||
%REVISION%=2486
|
|
||||||
%MINOR%=6
|
%MINOR%=6
|
||||||
|
%REVISION%=2487
|
||||||
|
%COREVERSION%=3
|
||||||
%MAJOR%=3
|
%MAJOR%=3
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
3.6.3.2486
|
3.6.3.2487
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
!define VERSION '3.6.3.2486'
|
!define VERSION '3.6.3.2487'
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,9 @@ type
|
||||||
GPen = System.Windows.Media.Pen;
|
GPen = System.Windows.Media.Pen;
|
||||||
/// Тип точки
|
/// Тип точки
|
||||||
Point = System.Windows.Point;
|
Point = System.Windows.Point;
|
||||||
/// Тип точки
|
/// Тип вектора
|
||||||
GPoint = System.Windows.Point;
|
GPoint = System.Windows.Point;
|
||||||
|
Vector = System.Windows.Vector;
|
||||||
GBrush = System.Windows.Media.Brush;
|
GBrush = System.Windows.Media.Brush;
|
||||||
/// Тип стиля шрифта
|
/// Тип стиля шрифта
|
||||||
FontStyle = (Normal,Bold,Italic,BoldItalic);
|
FontStyle = (Normal,Bold,Italic,BoldItalic);
|
||||||
|
|
@ -236,7 +237,7 @@ type
|
||||||
//>> Класс Vector # Vector class
|
//>> Класс Vector # Vector class
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
/// Класс Vector
|
/// Класс Vector
|
||||||
Vector = class
|
{Vector = class
|
||||||
public
|
public
|
||||||
x,y: real;
|
x,y: real;
|
||||||
/// Создаёт вектор с указанными координатами
|
/// Создаёт вектор с указанными координатами
|
||||||
|
|
@ -246,9 +247,7 @@ type
|
||||||
static function operator*(r: real; v: Vector): Vector := new Vector(r*v.x,r*v.y);
|
static function operator*(r: real; v: Vector): Vector := new Vector(r*v.x,r*v.y);
|
||||||
static function operator+(v: Vector; p: Point): Point := new Point(p.x+v.x,p.y+v.y);
|
static function operator+(v: Vector; p: Point): Point := new Point(p.x+v.x,p.y+v.y);
|
||||||
static function operator+(p: Point; v: Vector): Point := new Point(p.x+v.x,p.y+v.y);
|
static function operator+(p: Point; v: Vector): Point := new Point(p.x+v.x,p.y+v.y);
|
||||||
//static function operator implicit(t: (real,real)): Vector := new Vector(t[0],t[1]);
|
end;}
|
||||||
//static function operator implicit(t: (integer,integer)): Vector := new Vector(t[0],t[1]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
//{{{--doc: Конец секции 2 }}}
|
//{{{--doc: Конец секции 2 }}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
initialValue = tmp;
|
initialValue = tmp;
|
||||||
statements_list head_stmts = new statements_list(loopVariableLocation);
|
statements_list head_stmts = new statements_list(loopVariableLocation);
|
||||||
convertion_data_and_alghoritms.statement_list_stack_push(head_stmts);
|
convertion_data_and_alghoritms.statement_list_stack_push(head_stmts);
|
||||||
|
|
||||||
|
var early_init_loop_variable = false; // SSM 25/05/16
|
||||||
if (_for_node.type_name == null && !_for_node.create_loop_variable)
|
if (_for_node.type_name == null && !_for_node.create_loop_variable)
|
||||||
{
|
{
|
||||||
definition_node dn = context.check_name_node_type(_for_node.loop_variable.name, loopVariableLocation,
|
definition_node dn = context.check_name_node_type(_for_node.loop_variable.name, loopVariableLocation,
|
||||||
|
|
@ -83,6 +85,7 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
check_for_type_allowed(tn, get_location(_for_node.type_name));
|
check_for_type_allowed(tn, get_location(_for_node.type_name));
|
||||||
vdn = context.add_var_definition(_for_node.loop_variable.name, get_location(_for_node.loop_variable), tn, initialValue/*, polymorphic_state.ps_common*/);
|
vdn = context.add_var_definition(_for_node.loop_variable.name, get_location(_for_node.loop_variable), tn, initialValue/*, polymorphic_state.ps_common*/);
|
||||||
vdn.polymorphic_state = polymorphic_state.ps_common;
|
vdn.polymorphic_state = polymorphic_state.ps_common;
|
||||||
|
early_init_loop_variable = true; // SSM 25/05/16
|
||||||
}
|
}
|
||||||
internal_interface ii = vdn.type.get_internal_interface(internal_interface_kind.ordinal_interface);
|
internal_interface ii = vdn.type.get_internal_interface(internal_interface_kind.ordinal_interface);
|
||||||
if (ii == null)
|
if (ii == null)
|
||||||
|
|
@ -103,11 +106,14 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
res = find_operator(compiler_string_consts.assign_name, left, right, finishValueLocation);
|
res = find_operator(compiler_string_consts.assign_name, left, right, finishValueLocation);
|
||||||
head_stmts.statements.AddElement(res);
|
head_stmts.statements.AddElement(res);
|
||||||
|
|
||||||
left = create_variable_reference(vdn, loopVariableLocation);
|
if (!early_init_loop_variable) // SSM 25/05/16 - for var i := f1() to f2() do без этой правки дважды вызывал f1()
|
||||||
right = initialValue;
|
{
|
||||||
res = find_operator(compiler_string_consts.assign_name, left, right, loopVariableLocation);
|
left = create_variable_reference(vdn, loopVariableLocation);
|
||||||
head_stmts.statements.AddElement(res);
|
right = initialValue;
|
||||||
|
res = find_operator(compiler_string_consts.assign_name, left, right, loopVariableLocation);
|
||||||
|
head_stmts.statements.AddElement(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
location initialValueLocation = get_location(_for_node.initial_value);
|
location initialValueLocation = get_location(_for_node.initial_value);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,9 @@ type
|
||||||
GPen = System.Windows.Media.Pen;
|
GPen = System.Windows.Media.Pen;
|
||||||
/// Тип точки
|
/// Тип точки
|
||||||
Point = System.Windows.Point;
|
Point = System.Windows.Point;
|
||||||
/// Тип точки
|
/// Тип вектора
|
||||||
GPoint = System.Windows.Point;
|
GPoint = System.Windows.Point;
|
||||||
|
Vector = System.Windows.Vector;
|
||||||
GBrush = System.Windows.Media.Brush;
|
GBrush = System.Windows.Media.Brush;
|
||||||
/// Тип стиля шрифта
|
/// Тип стиля шрифта
|
||||||
FontStyle = (Normal,Bold,Italic,BoldItalic);
|
FontStyle = (Normal,Bold,Italic,BoldItalic);
|
||||||
|
|
@ -236,7 +237,7 @@ type
|
||||||
//>> Класс Vector # Vector class
|
//>> Класс Vector # Vector class
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
/// Класс Vector
|
/// Класс Vector
|
||||||
Vector = class
|
{Vector = class
|
||||||
public
|
public
|
||||||
x,y: real;
|
x,y: real;
|
||||||
/// Создаёт вектор с указанными координатами
|
/// Создаёт вектор с указанными координатами
|
||||||
|
|
@ -246,9 +247,7 @@ type
|
||||||
static function operator*(r: real; v: Vector): Vector := new Vector(r*v.x,r*v.y);
|
static function operator*(r: real; v: Vector): Vector := new Vector(r*v.x,r*v.y);
|
||||||
static function operator+(v: Vector; p: Point): Point := new Point(p.x+v.x,p.y+v.y);
|
static function operator+(v: Vector; p: Point): Point := new Point(p.x+v.x,p.y+v.y);
|
||||||
static function operator+(p: Point; v: Vector): Point := new Point(p.x+v.x,p.y+v.y);
|
static function operator+(p: Point; v: Vector): Point := new Point(p.x+v.x,p.y+v.y);
|
||||||
//static function operator implicit(t: (real,real)): Vector := new Vector(t[0],t[1]);
|
end;}
|
||||||
//static function operator implicit(t: (integer,integer)): Vector := new Vector(t[0],t[1]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
//{{{--doc: Конец секции 2 }}}
|
//{{{--doc: Конец секции 2 }}}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue