This commit is contained in:
miks1965 2018-08-22 12:35:57 +03:00
parent b64b861925
commit ae51735f34
11 changed files with 2238 additions and 2200 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3"; public const string Major = "3";
public const string Minor = "4"; public const string Minor = "4";
public const string Build = "0"; public const string Build = "0";
public const string Revision = "1758"; public const string Revision = "1759";
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;

View file

@ -1,4 +1,4 @@
%MINOR%=4
%REVISION%=1758
%COREVERSION%=0 %COREVERSION%=0
%REVISION%=1759
%MINOR%=4
%MAJOR%=3 %MAJOR%=3

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX // This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301 // Version: 1.1.3.301
// Machine: DESKTOP-A6LT9RI // Machine: DESKTOP-A6LT9RI
// DateTime: 16.08.2018 16:00:17 // DateTime: 22.08.2018 11:25:53
// UserName: ????????? // UserName: ?????????
// GPLEX input file <ABCPascal.lex> // GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource> // GPLEX frame file <embedded resource>

View file

@ -4,7 +4,7 @@
// ========================================================================== // ==========================================================================
// Version: 1.3.6 // Version: 1.3.6
// Machine: DESKTOP-A6LT9RI // Machine: DESKTOP-A6LT9RI
// DateTime: 13.08.2018 11:18:26 // DateTime: 22.08.2018 11:22:41
// UserName: Станислав // UserName: Станислав
// ========================================================================== // ==========================================================================
@ -189,6 +189,8 @@
%type <stn> pattern pattern_optional_var match_with pattern_case pattern_cases pattern_out_param pattern_out_param_optional_var %type <stn> pattern pattern_optional_var match_with pattern_case pattern_cases pattern_out_param pattern_out_param_optional_var
%type <ob> pattern_out_param_list pattern_out_param_list_optional_var %type <ob> pattern_out_param_list pattern_out_param_list_optional_var
%% %%
// Warning: NonTerminal symbol "array_name_for_new_expr" is unreachable
// --------------------------------------------------------------------
parse_goal parse_goal
: program_file : program_file
@ -2808,6 +2810,10 @@ match_with
{ {
$$ = new match_with($2, $4 as pattern_cases, $5 as statement, @$); $$ = new match_with($2, $4 as pattern_cases, $5 as statement, @$);
} }
| tkMatch expr_l1 tkWith pattern_cases tkSemiColon else_case tkEnd
{
$$ = new match_with($2, $4 as pattern_cases, $6 as statement, @$);
}
; ;
pattern_cases pattern_cases
@ -2822,9 +2828,7 @@ pattern_cases
; ;
pattern_case pattern_case
: : pattern_optional_var tkWhen expr_l1 tkColon unlabelled_stmt
{ $$ = new empty_statement(); }
| pattern_optional_var tkWhen expr_l1 tkColon unlabelled_stmt
{ {
$$ = new pattern_case($1 as pattern_node, $5 as statement, $3, @$); $$ = new pattern_case($1 as pattern_node, $5 as statement, $3, @$);
} }
@ -2838,7 +2842,15 @@ case_stmt
: tkCase expr_l1 tkOf case_list else_case tkEnd : tkCase expr_l1 tkOf case_list else_case tkEnd
{ {
$$ = new case_node($2, $4 as case_variants, $5 as statement, @$); $$ = new case_node($2, $4 as case_variants, $5 as statement, @$);
} }
| tkCase expr_l1 tkOf case_list tkSemiColon else_case tkEnd
{
$$ = new case_node($2, $4 as case_variants, $6 as statement, @$);
}
| tkCase expr_l1 tkOf else_case tkEnd
{
$$ = new case_node($2, NewCaseItem(new empty_statement(), null), $4 as statement, @$);
}
; ;
case_list case_list
@ -2855,11 +2867,7 @@ case_list
; ;
case_item case_item
: : case_label_list tkColon unlabelled_stmt
{
$$ = new empty_statement();
}
| case_label_list tkColon unlabelled_stmt
{ {
$$ = new case_variant($1 as expression_list, $3 as statement, @$); $$ = new case_variant($1 as expression_list, $3 as statement, @$);
} }
@ -3186,7 +3194,7 @@ new_expr
{ {
$$ = new new_expr($2, $3 as expression_list, false, null, @$); $$ = new new_expr($2, $3 as expression_list, false, null, @$);
} }
| tkNew array_name_for_new_expr tkSquareOpen optional_expr_list tkSquareClose optional_array_initializer | tkNew simple_or_template_type_reference tkSquareOpen optional_expr_list tkSquareClose optional_array_initializer
{ {
var el = $4 as expression_list; var el = $4 as expression_list;
if (el == null) if (el == null)
@ -3261,8 +3269,8 @@ list_fields_in_unnamed_object
array_name_for_new_expr array_name_for_new_expr
: simple_type_identifier : simple_type_identifier
{ $$ = $1; } { $$ = $1; }
| unsized_array_type // | unsized_array_type - è êîìó òàêîå ïðèñíèëîñü
{ $$ = $1; } // { $$ = $1; }
; ;
optional_expr_list_with_bracket optional_expr_list_with_bracket

View file

@ -146,7 +146,7 @@
%type <stn> stmt_or_expression unlabelled_stmt stmt case_item %type <stn> stmt_or_expression unlabelled_stmt stmt case_item
%type <td> set_type %type <td> set_type
%type <ex> as_is_expr as_is_constexpr is_expr as_expr power_expr power_constexpr %type <ex> as_is_expr as_is_constexpr is_expr as_expr power_expr power_constexpr
%type <td> unsized_array_type simple_type_or_ simple_type array_name_for_new_expr foreach_stmt_ident_dype_opt fptype type_ref fptype_noproctype array_type %type <td> unsized_array_type simple_type_or_ simple_type /*array_name_for_new_expr*/ foreach_stmt_ident_dype_opt fptype type_ref fptype_noproctype array_type
%type <td> template_param structured_type unpacked_structured_type simple_or_template_type_reference type_ref_or_secific for_stmt_decl_or_assign type_decl_type %type <td> template_param structured_type unpacked_structured_type simple_or_template_type_reference type_ref_or_secific for_stmt_decl_or_assign type_decl_type
%type <stn> type_ref_and_secific_list %type <stn> type_ref_and_secific_list
%type <stn> type_decl_sect %type <stn> type_decl_sect
@ -3181,7 +3181,7 @@ new_expr
{ {
$$ = new new_expr($2, $3 as expression_list, false, null, @$); $$ = new new_expr($2, $3 as expression_list, false, null, @$);
} }
| tkNew array_name_for_new_expr tkSquareOpen optional_expr_list tkSquareClose optional_array_initializer | tkNew simple_or_template_type_reference tkSquareOpen optional_expr_list tkSquareClose optional_array_initializer
{ {
var el = $4 as expression_list; var el = $4 as expression_list;
if (el == null) if (el == null)
@ -3253,12 +3253,12 @@ list_fields_in_unnamed_object
} }
; ;
array_name_for_new_expr /*array_name_for_new_expr
: simple_type_identifier : simple_type_identifier
{ $$ = $1; } { $$ = $1; }
// | unsized_array_type - è êîìó òàêîå ïðèñíèëîñü // | unsized_array_type - è êîìó òàêîå ïðèñíèëîñü
// { $$ = $1; } // { $$ = $1; }
; ;*/
optional_expr_list_with_bracket optional_expr_list_with_bracket
: :

File diff suppressed because it is too large Load diff

View file

@ -230,7 +230,6 @@
<name value="exception_identifier" /> <name value="exception_identifier" />
<name value="exception_class_type_identifier" /> <name value="exception_class_type_identifier" />
<name value="exception_variable" /> <name value="exception_variable" />
<name value="array_name_for_new_expr" />
<name value="identifier" /> <name value="identifier" />
<name value="identifier_or_keyword" /> <name value="identifier_or_keyword" />
<name value="identifier_keyword_operatorname" /> <name value="identifier_keyword_operatorname" />

View file

@ -211,5 +211,6 @@ script=

View file

@ -1 +1 @@
!define VERSION '3.4.0.1758' !define VERSION '3.4.0.1759'

View file

@ -0,0 +1,4 @@
begin
var a := new Dictionary<integer,integer>[10];
Assert(a[0]=nil)
end.

View file

@ -310,22 +310,40 @@ type
procedure RecalcYH(y1,y2: real) := (Top,Height) := (min(y1,y2),abs(y1-y2)); procedure RecalcYH(y1,y2: real) := (Top,Height) := (min(y1,y2),abs(y1-y2));
procedure ES(value: GColor) := Element.Stroke := new SolidColorBrush(Value); procedure ES(value: GColor) := Element.Stroke := new SolidColorBrush(Value);
procedure EST(value: real) := Element.StrokeThickness := Value; procedure EST(value: real) := Element.StrokeThickness := Value;
procedure WX1(value: real) := begin procedure WX1(value: real);
begin
var xx2 := x2; var xx2 := x2;
RecalcXW(value,xx2); RecalcXW(value,xx2);
if value<xx2 then if value<xx2 then
(Element.X1,Element.X2) := (0,Width) (Element.X1,Element.X2) := (0,Width)
else (Element.X1,Element.X2) := (Width,0); else (Element.X1,Element.X2) := (Width,0);
end; end;
procedure WX2(value: real) := begin procedure WX2(value: real);
begin
var xx1 := x1; var xx1 := x1;
RecalcXW(xx1,value); RecalcXW(xx1,value);
if value>xx1 then if value>xx1 then
(Element.X1,Element.X2) := (0,Width) (Element.X1,Element.X2) := (0,Width)
else (Element.X1,Element.X2) := (Width,0); else (Element.X1,Element.X2) := (Width,0);
end; end;
procedure WY1(value: real) := begin Element.Y1 := value - Top; {RecalcWHXY;} end; {procedure WY1(value: real) := begin Element.Y1 := value - Top; end;
procedure WY2(value: real) := begin Element.Y2 := value - Top; {RecalcWHXY;} end; procedure WY2(value: real) := begin Element.Y2 := value - Top; end;}
procedure WY1(value: real);
begin
var yy2 := y2;
RecalcYH(value,yy2);
if value<yy2 then
(Element.Y1,Element.Y2) := (0,Height)
else (Element.Y1,Element.Y2) := (Height,0);
end;
procedure WY2(value: real);
begin
var yy1 := y1;
RecalcYH(yy1,value);
if value>yy1 then
(Element.Y1,Element.Y2) := (0,Height)
else (Element.Y1,Element.Y2) := (Height,0);
end;
function GetInternalGeometry: Geometry; override := (ob as Shape).RenderedGeometry; function GetInternalGeometry: Geometry; override := (ob as Shape).RenderedGeometry;
public public
constructor (x1,y1,x2,y2: real; c: GColor) := Invoke(InitOb2,x1,y1,x2,y2,c); constructor (x1,y1,x2,y2: real; c: GColor) := Invoke(InitOb2,x1,y1,x2,y2,c);
@ -340,6 +358,20 @@ type
property Y1: real read InvokeReal(()->Element.Y1 + Top) write Invoke(WY1,value); property Y1: real read InvokeReal(()->Element.Y1 + Top) write Invoke(WY1,value);
property Y2: real read InvokeReal(()->Element.Y2 + Top) write Invoke(WY2,value); property Y2: real read InvokeReal(()->Element.Y2 + Top) write Invoke(WY2,value);
property P1: Point read Pnt(X1,Y1) write begin X1 := Value.X; Y1 := Value.Y end; property P1: Point read Pnt(X1,Y1) write begin X1 := Value.X; Y1 := Value.Y end;
property Width: real
read InvokeReal(()->gr.Width)
write
begin
var gr1 := gr;
Invoke(procedure->begin gr1.Width := value; end);
end; override;
property Height: real
read InvokeReal(()->gr.Height)
write
begin
var gr1 := gr;
Invoke(procedure->begin gr1.Height := value; end);
end; override;
end; end;
RegularPolygonWPF = class(BoundedObjectWPF) RegularPolygonWPF = class(BoundedObjectWPF)