diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-09-05 16:29:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-09-05 16:29:23 +0200 |
commit | 4974b4763bd60eb875f93a71dbe2fe82ecfed9fc (patch) | |
tree | 9353fb3fec3fa5f77f1faaf6da8185e3d006e7ba /cli/semantics/option.cxx | |
parent | e2299f6d95ba3264072d6ddc49f153ad73fd9d24 (diff) |
Add semantic graph and traversal mechanism
The parser now builds the semantic graph.
Diffstat (limited to 'cli/semantics/option.cxx')
-rw-r--r-- | cli/semantics/option.cxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/cli/semantics/option.cxx b/cli/semantics/option.cxx new file mode 100644 index 0000000..94b02a2 --- /dev/null +++ b/cli/semantics/option.cxx @@ -0,0 +1,48 @@ +// file : cli/semantics/option.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#include <cutl/compiler/type-info.hxx> + +#include <semantics/option.hxx> + +namespace semantics +{ + // type info + // + namespace + { + struct init + { + init () + { + using compiler::type_info; + + // belongs + // + { + type_info ti (typeid (belongs)); + ti.add_base (typeid (edge)); + insert (ti); + } + + // initializes + // + { + type_info ti (typeid (initialized)); + ti.add_base (typeid (edge)); + insert (ti); + } + + // option + // + { + type_info ti (typeid (option)); + ti.add_base (typeid (nameable)); + insert (ti); + } + } + } init_; + } +} |