From 8e761289a2446367267c6c0d9a26e734f0f78306 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 16 Dec 2020 20:29:05 +0300 Subject: Get rid of legacy build systems and rename cutl/ to libcutl/ --- libcutl/compiler/cxx-indenter.cxx | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 libcutl/compiler/cxx-indenter.cxx (limited to 'libcutl/compiler/cxx-indenter.cxx') diff --git a/libcutl/compiler/cxx-indenter.cxx b/libcutl/compiler/cxx-indenter.cxx new file mode 100644 index 0000000..72bcaf5 --- /dev/null +++ b/libcutl/compiler/cxx-indenter.cxx @@ -0,0 +1,48 @@ +// file : libcutl/compiler/cxx-indenter.cxx +// license : MIT; see accompanying LICENSE file + +#include + +namespace cutl +{ + namespace compiler + { + template<> + LIBCUTL_EXPORT char const* cxx_indenter:: + keyword (cxx_indenter::keyword_type t) + { + static char const* keywords[] = + { + "if", + "do", + "for", + "else", + "case", + "while", + "catch", + "default" + }; + + return keywords[t]; + } + + template<> + LIBCUTL_EXPORT wchar_t const* cxx_indenter:: + keyword (cxx_indenter::keyword_type t) + { + static wchar_t const* keywords[] = + { + L"if", + L"do", + L"for", + L"else", + L"case", + L"while", + L"catch", + L"default" + }; + + return keywords[t]; + } + } +} -- cgit v1.1