From 64ff415ed33a733f9a297b1526403bfb8f391c63 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 23 Mar 2010 12:34:58 +0200 Subject: Semantic graph and parsing code Currently covers/handles namespace, class definitions (including bases and data members), and typedefs in namespace-scopes. --- odb/semantics/fundamental.hxx | 113 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 odb/semantics/fundamental.hxx (limited to 'odb/semantics/fundamental.hxx') diff --git a/odb/semantics/fundamental.hxx b/odb/semantics/fundamental.hxx new file mode 100644 index 0000000..aa8225a --- /dev/null +++ b/odb/semantics/fundamental.hxx @@ -0,0 +1,113 @@ +// file : odb/semantics/fundamental.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_SEMANTICS_FUNDAMENTAL_HXX +#define ODB_SEMANTICS_FUNDAMENTAL_HXX + +#include + +namespace semantics +{ + // + // Fundamental C++ types. + // + + class fund_type: public type {}; + + struct fund_void: fund_type + { + fund_void (): node (path (""), 0, 0) {} + }; + + struct fund_bool: fund_type + { + fund_bool (): node (path (""), 0, 0) {} + }; + + // + // Integral. + // + + struct fund_char: fund_type + { + fund_char (): node (path (""), 0, 0) {} + }; + + struct fund_wchar: fund_type + { + fund_wchar (): node (path (""), 0, 0) {} + }; + + struct fund_signed_char: fund_type + { + fund_signed_char (): node (path (""), 0, 0) {} + }; + + struct fund_unsigned_char: fund_type + { + fund_unsigned_char (): node (path (""), 0, 0) {} + }; + + struct fund_short: fund_type + { + fund_short (): node (path (""), 0, 0) {} + }; + + struct fund_unsigned_short: fund_type + { + fund_unsigned_short (): node (path (""), 0, 0) {} + }; + + struct fund_int: fund_type + { + fund_int (): node (path (""), 0, 0) {} + }; + + struct fund_unsigned_int: fund_type + { + fund_unsigned_int (): node (path (""), 0, 0) {} + }; + + struct fund_long: fund_type + { + fund_long (): node (path (""), 0, 0) {} + }; + + struct fund_unsigned_long: fund_type + { + fund_unsigned_long (): node (path (""), 0, 0) {} + }; + + struct fund_long_long: fund_type + { + fund_long_long (): node (path (""), 0, 0) {} + }; + + struct fund_unsigned_long_long: fund_type + { + fund_unsigned_long_long (): node (path (""), 0, 0) {} + }; + + // + // Real. + // + + struct fund_float: fund_type + { + fund_float (): node (path (""), 0, 0) {} + }; + + struct fund_double: fund_type + { + fund_double (): node (path (""), 0, 0) {} + }; + + struct fund_long_double: fund_type + { + fund_long_double (): node (path (""), 0, 0) {} + }; +} + +#endif // ODB_SEMANTICS_FUNDAMENTAL_HXX -- cgit v1.1