File tree 2 files changed +12
-1
lines changed
Grammars/SimpleSharp.Compiler
Nitra/Nitra.Compiler/Generation/Declarations
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,7 @@ namespace JetBrains.Nitra.Samples.SimpleSharp
7
7
Baz : int -> Nitra.NSpan * Nitra.NSpan? * Nitra.NSpan+ -> Nitra.Ast?;
8
8
Foo : Nitra.Ast+;
9
9
Bar : Nitra.NSpan? * Nitra.Ast;
10
+ Bar2 : Nitra.NSpan? * Nitra.Ast = Bar;
11
+ Paz : int { 4 * 2 }
10
12
}
11
13
}
Original file line number Diff line number Diff line change @@ -42,7 +42,16 @@ namespace Nitra.Compiler
42
42
43
43
foreach (fieldSymbol in this ._declarationSymbol.Fields)
44
44
{
45
- unless (fieldSymbol.HasBody)
45
+ if (fieldSymbol.HasBody)
46
+ {
47
+ this ._tb.DefineConditional(<[ decl:
48
+ public $(fieldSymbol.Name : usesite) : $(makeType(fieldSymbol))
49
+ {
50
+ get { $(fieldSymbol.Body.Expr) }
51
+ }
52
+ ]>);
53
+ }
54
+ else
46
55
{
47
56
this ._tb.DefineConditional(<[ decl:
48
57
public $(fieldSymbol.Name : usesite) : $(makeType(fieldSymbol));
You can’t perform that action at this time.
0 commit comments