From 610ba7cb25d6ea776efa50ba549fd76580eface9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jesper=20=C3=96qvist?= <jesper.oqvist@cs.lth.se>
Date: Thu, 22 Mar 2018 11:27:27 +0100
Subject: [PATCH] Tweak AST declaration template

---
 TODO                                   |  1 +
 src/app/ast-decl/ast-decl.component.ts | 12 ++++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/TODO b/TODO
index 86d5896..830b6d0 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+++ Separate attribute declarations and equations in type view.
 ++ Add thrown type descriptions.
 ++ Make current member filter more noticeable.
 ++ Add class overview as default page.
diff --git a/src/app/ast-decl/ast-decl.component.ts b/src/app/ast-decl/ast-decl.component.ts
index 9e7b3d7..291aa19 100644
--- a/src/app/ast-decl/ast-decl.component.ts
+++ b/src/app/ast-decl/ast-decl.component.ts
@@ -16,10 +16,10 @@ import {AstDecl} from './ast-decl';
     }
   `],
   template: `
-  <p *ngIf="_decl">JastAdd production: <br>
-    <div class="ast-decl">{{_decl.name}}: <type-ref [type]="_decl.extends"></type-ref><!--
-    --><ng-container *ngIf="_decl.components"> ::= <!--
-      --><ng-container *ngFor="let comp of _decl.components"><!--
+  <p *ngIf="decl">JastAdd production: <br>
+    <div class="ast-decl">{{decl.name}}: <type-ref [type]="decl.extends"></type-ref><!--
+    --><ng-container *ngIf="decl.components"> ::= <!--
+      --><ng-container *ngFor="let comp of decl.components"><!--
         --><div class="ast-component"><!--
         --><ng-container *ngIf="comp.kind == 'regular'"><!--
           --><ng-container *ngIf="comp.name">{{comp.name}}:</ng-container><type-ref [type]="comp.type"></type-ref> <!--
@@ -48,4 +48,8 @@ export class AstDeclComponent {
   set decl(decl: AstDecl) {
     this._decl = decl;
   }
+
+  get decl(): AstDecl {
+    return this._decl;
+  }
 }
-- 
GitLab