summaryrefslogtreecommitdiff
path: root/cli/semantics/class.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-05-10 17:54:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-05-10 17:54:18 +0200
commit443293aaf09eca7c3b88d621d056c4effee2c248 (patch)
treea35c7b2354295b5b73462c0806e04e2deef58171 /cli/semantics/class.cxx
parent4f9022f24c4591391637121c7274d9855b37bd93 (diff)
Implement option class inheritance
For now multiple, non-virtual inheritance is supported. An option class can now also be declared abstract using the class c = 0 {...}; syntax. New option, --exclude-base, controls whether base class information is present in usage and documentation.
Diffstat (limited to 'cli/semantics/class.cxx')
-rw-r--r--cli/semantics/class.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/cli/semantics/class.cxx b/cli/semantics/class.cxx
index 1af31dc..9a6fc85 100644
--- a/cli/semantics/class.cxx
+++ b/cli/semantics/class.cxx
@@ -19,9 +19,21 @@ namespace semantics
{
using compiler::type_info;
- type_info ti (typeid (class_));
- ti.add_base (typeid (scope));
- insert (ti);
+ // inherits
+ //
+ {
+ type_info ti (typeid (inherits));
+ ti.add_base (typeid (edge));
+ insert (ti);
+ }
+
+ // class_
+ //
+ {
+ type_info ti (typeid (class_));
+ ti.add_base (typeid (scope));
+ insert (ti);
+ }
}
} init_;
}