fix #849
This commit is contained in:
parent
8026b6b31c
commit
16b42239ab
|
|
@ -1,9 +1,9 @@
|
|||
//
|
||||
// This CSharp output file generated by Gardens Point LEX
|
||||
// Version: 1.1.3.301
|
||||
// Machine: ALEXANDER-PC
|
||||
// DateTime: 17.05.2018 0:42:21
|
||||
// UserName: Alexander
|
||||
// Machine: DESKTOP-A6LT9RI
|
||||
// DateTime: 22.05.2018 10:42:20
|
||||
// UserName: ?????????
|
||||
// GPLEX input file <ABCPascal.lex>
|
||||
// GPLEX frame file <embedded resource>
|
||||
//
|
||||
|
|
|
|||
|
|
@ -2024,6 +2024,15 @@ constr_destr_decl
|
|||
if (parsertools.build_tree_for_formatter)
|
||||
$$ = new short_func_definition($$ as procedure_definition);
|
||||
}
|
||||
| tkClass tkConstructor optional_proc_name fp_list tkAssign unlabelled_stmt tkSemiColon
|
||||
{
|
||||
if ($6 is empty_statement)
|
||||
parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",@7);
|
||||
var tmp = new constructor(null,$4 as formal_parameters,new procedure_attributes_list(new List<procedure_attribute>(),@$),$3 as method_name,false,true,null,null,@$);
|
||||
$$ = new procedure_definition(tmp as procedure_header, new block(null,new statement_list($6 as statement,@6),@6), @$);
|
||||
if (parsertools.build_tree_for_formatter)
|
||||
$$ = new short_func_definition($$ as procedure_definition);
|
||||
}
|
||||
;
|
||||
|
||||
inclass_constr_destr_decl
|
||||
|
|
@ -2035,11 +2044,20 @@ inclass_constr_destr_decl
|
|||
{
|
||||
if ($5 is empty_statement)
|
||||
parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",@6);
|
||||
var tmp = new constructor(null,$3 as formal_parameters,new procedure_attributes_list(new List<procedure_attribute>(),@$),$2 as method_name,false,false,null,null,LexLocation.MergeAll(@1,@2,@3));
|
||||
var tmp = new constructor(null,$3 as formal_parameters,new procedure_attributes_list(new List<procedure_attribute>(),@$),$2 as method_name,false,false,null,null,LexLocation.MergeAll(@1,@2,@3,@4));
|
||||
$$ = new procedure_definition(tmp as procedure_header, new block(null,new statement_list($5 as statement,@5),@5), @$);
|
||||
if (parsertools.build_tree_for_formatter)
|
||||
$$ = new short_func_definition($$ as procedure_definition);
|
||||
}
|
||||
| tkClass tkConstructor optional_proc_name fp_list tkAssign unlabelled_stmt tkSemiColon
|
||||
{
|
||||
if ($6 is empty_statement)
|
||||
parsertools.AddErrorFromResource("EMPTY_STATEMENT_IN_SHORT_PROC_DEFINITION",@7);
|
||||
var tmp = new constructor(null,$4 as formal_parameters,new procedure_attributes_list(new List<procedure_attribute>(),@$),$3 as method_name,false,true,null,null,LexLocation.MergeAll(@1,@2,@3,@4));
|
||||
$$ = new procedure_definition(tmp as procedure_header, new block(null,new statement_list($6 as statement,@6),@6), @$);
|
||||
if (parsertools.build_tree_for_formatter)
|
||||
$$ = new short_func_definition($$ as procedure_definition);
|
||||
}
|
||||
;
|
||||
|
||||
proc_func_decl
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -189,5 +189,6 @@ script=
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
8
TestSuite/ShortClassConstructor.pas
Normal file
8
TestSuite/ShortClassConstructor.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
type
|
||||
t1 = class
|
||||
class constructor := Assert(True);
|
||||
end;
|
||||
|
||||
begin
|
||||
var t := new t1;
|
||||
end.
|
||||
Loading…
Reference in a new issue