summaryrefslogtreecommitdiff
path: root/cli/lexer.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-04-08 14:51:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-04-27 11:38:53 +0300
commit720c5a33b6a49cf328fdd7611f49153cf8f60247 (patch)
tree9725f3d1f42ec90fde84520f49647edea013ce5e /cli/lexer.ixx
parent3183f3bb927a90783ae0aeaf190a0919377aabe4 (diff)
Separate tests and examples into individual packages
Also make cli module to be explicitly enabled via the config.cli configuration variable.
Diffstat (limited to 'cli/lexer.ixx')
-rw-r--r--cli/lexer.ixx91
1 files changed, 0 insertions, 91 deletions
diff --git a/cli/lexer.ixx b/cli/lexer.ixx
deleted file mode 100644
index 1c4c42e..0000000
--- a/cli/lexer.ixx
+++ /dev/null
@@ -1,91 +0,0 @@
-// file : cli/lexer.ixx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// license : MIT; see accompanying LICENSE file
-
-// lexer::xchar
-//
-inline lexer::xchar::
-xchar (int_type v, std::size_t l, std::size_t c)
- : v_ (v), l_ (l), c_ (c)
-{
-}
-
-inline lexer::xchar::
-operator char_type () const
-{
- return traits_type::to_char_type (v_);
-}
-
-inline lexer::xchar::int_type lexer::xchar::
-value () const
-{
- return v_;
-}
-
-inline std::size_t lexer::xchar::
-line () const
-{
- return l_;
-}
-
-inline std::size_t lexer::xchar::
-column () const
-{
- return c_;
-}
-
-// lexer
-//
-inline bool lexer::
-valid () const
-{
- return valid_;
-}
-
-inline bool lexer::
-is_alpha (char c) const
-{
- return std::isalpha (c, loc_);
-}
-
-inline bool lexer::
-is_oct_digit (char c) const
-{
- return std::isdigit (c, loc_) && c != '8' && c != '9';
-}
-
-inline bool lexer::
-is_dec_digit (char c) const
-{
- return std::isdigit (c, loc_);
-}
-
-inline bool lexer::
-is_hex_digit (char c) const
-{
- return std::isxdigit (c, loc_);
-}
-
-inline bool lexer::
-is_alnum (char c) const
-{
- return std::isalnum (c, loc_);
-}
-
-inline bool lexer::
-is_space (char c) const
-{
- return std::isspace (c, loc_);
-}
-
-inline bool lexer::
-is_eos (xchar const& c) const
-{
- return c.value () == xchar::traits_type::eof ();
-}
-
-inline char lexer::
-to_upper (char c) const
-{
- return std::toupper (c, loc_);
-}