This commit is contained in:
Бондарев Иван 2017-10-15 15:08:57 +02:00
parent 9a952bbcf4
commit c3bb2ed953
5 changed files with 1566 additions and 1542 deletions

View file

@ -358,6 +358,18 @@ namespace PascalABCCompiler.Parsers
this.description = description;
}
public SymInfo(SymInfo si)
{
this.name = si.name;
this.addit_name = si.addit_name;
this.description = si.description;
this.kind = si.kind;
this.IsUnitNamespace = si.IsUnitNamespace;
this.acc_mod = si.acc_mod;
this.has_doc = si.has_doc;
this.not_include = si.not_include;
}
public string Name
{
get

View file

@ -1,9 +1,9 @@
//
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: DESKTOP-A6LT9RI
// DateTime: 29.09.2017 13:47:41
// UserName: ?????????
// Machine: IVAN-PC
// DateTime: 15.10.2017 14:45:01
// UserName: Ivan
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>
//

View file

@ -817,6 +817,8 @@ const_factor
{
$$ = new un_expr($2, $1.type, @$);
}
| new_expr
{ $$ = $1; }
| tkDeref const_factor
{
$$ = new roof_dereference($2 as addressed_value, @$);
@ -1933,8 +1935,8 @@ typed_var_init_expression
typed_const_plus
: typed_const
{ $$ = $1; }
| new_expr
{ $$ = $1; }
/*| new_expr
{ $$ = $1; }*/
| default_expr
{ $$ = $1; }
;

File diff suppressed because it is too large Load diff

10
TestSuite/new1.pas Normal file
View file

@ -0,0 +1,10 @@
function f(l: sequence of integer): integer;
begin
Result := l.Sum;
end;
begin
var i: integer := f(new integer[](1,2));
assert(i = 3);
var j: integer := f(new List<integer>);
assert(j = 0);
end.