This commit is contained in:
miks1965 2017-10-27 02:41:17 +03:00
parent 2c44f13b7e
commit a33768fb4e
8 changed files with 29 additions and 9 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "3";
public const string Build = "0";
public const string Revision = "1555";
public const string Revision = "1556";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=1555
%MINOR%=3
%REVISION%=1556
%COREVERSION%=0
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.3.0.1555'
!define VERSION '3.3.0.1556'

View file

@ -3972,7 +3972,7 @@ begin
gr := Graphics.FromHwnd(f.Handle);
if (System.Environment.OSVersion.Version.Major >= 6) then SetProcessDPIAware();
//if (System.Environment.OSVersion.Version.Major >= 6) then SetProcessDPIAware();
InitBMP;
end;

View file

@ -0,0 +1,11 @@
var glob1: real -> real := x->x*x;
var a := ArrGen(10,x->x);
var y := 222;
var glob2: real -> real := x->x+y;
begin
Print(glob1(2));
Print(glob2(2));
end.

View file

@ -209,8 +209,8 @@ type
function GetUD: Vector3D := Invoke&<Vector3D>(()->Cam.UpDirection);
procedure SetDP(d: real);
begin
var dist := Position.DistanceTo(P3D(0,0,0));
Position := Position.Multiply(d/dist);
var dist := Cam.Position.DistanceTo(P3D(0,0,0));
Cam.Position := Cam.Position.Multiply(d/dist);
end;
procedure SetD(d: real) := Invoke(SetDP,d);
function GetD: real := Invoke&<real>(()->Cam.Position.DistanceTo(P3D(0,0,0)));

View file

@ -2503,6 +2503,7 @@ namespace PascalABCCompiler.TreeConverter
public override void visit(SyntaxTree.block _block)
{
var tt = context.converting_block();
List<declaration> declarations_with_lambdas = new List<declaration>();
if (/*context.converting_block() != block_type.namespace_block && */_block.defs != null && _block.defs.defs != null)
{
@ -2526,9 +2527,11 @@ namespace PascalABCCompiler.TreeConverter
foreach (var_def_statement vds in vd.list)
{
var lambdaSearcher = new LambdaSearcher(vds);
if (lambdaSearcher.CheckIfContainsLambdas())
if (lambdaSearcher.CheckIfContainsLambdas() && !(vds.inital_value is function_lambda_definition)) // SSM 27/10/17
{
procedure_definition func = new short_func_definition(SyntaxTreeBuilder.BuildShortFuncDefinition(new formal_parameters(), new procedure_attributes_list(), new method_name("<>lambda_initializer" + lambda_init_index), null, vds.inital_value, null));
procedure_definition func =
new short_func_definition(
SyntaxTreeBuilder.BuildShortFuncDefinition(new formal_parameters(), new procedure_attributes_list(), new method_name("<>lambda_initializer" + lambda_init_index), null, vds.inital_value, null));
vds.inital_value = new method_call(new ident("<>lambda_initializer"+lambda_init_index), new expression_list());
_block.defs.InsertBefore(vd, func);

View file

@ -1138,6 +1138,12 @@ namespace VisualPascalABCPlugins
prepare_node(node.left, "left");
prepare_node(node.right, "right");
}
public override void visit(short_func_definition node)
{
prepare_node(node.proc_header, "proc_header");
prepare_node(node.proc_body, "proc_body");
prepare_node(node.procdef, "procdef");
}
}