summaryrefslogtreecommitdiff
path: root/cli/token.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-08-22 17:54:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-08-22 17:54:26 +0200
commit64aa9e062d09d33de99ab4ddc0dc73828af2543e (patch)
tree4ca7cd26dec156b2d4c28f100679e3db12dace91 /cli/token.hxx
parentdc7b8d2063dac867f2e87dbe764d2f3df2331e95 (diff)
Convert to the lower case naming convention
Diffstat (limited to 'cli/token.hxx')
-rw-r--r--cli/token.hxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/cli/token.hxx b/cli/token.hxx
index 08918f8..b7b656a 100644
--- a/cli/token.hxx
+++ b/cli/token.hxx
@@ -9,10 +9,10 @@
#include <string>
#include <cstddef> // std::size_t
-class Token
+class token
{
public:
- enum Type
+ enum token_type
{
t_eos,
t_keyword,
@@ -28,7 +28,7 @@ public:
t_template_expr // The so called "template expression", e.g., <foo, 3>.
};
- Type
+ token_type
type () const;
std::size_t
@@ -40,7 +40,7 @@ public:
// Keyword
//
public:
- enum Keyword
+ enum keyword_type
{
k_include,
k_namespace,
@@ -60,7 +60,7 @@ public:
// Return the keyword id if type is t_keyword and k_invalid otherwise.
//
- Keyword
+ keyword_type
keyword () const;
// Identifier
@@ -72,7 +72,7 @@ public:
// Punctuation
//
public:
- enum Punctuation
+ enum punctuation_type
{
p_semi,
p_comma,
@@ -89,7 +89,7 @@ public:
// Return the punctuation id if type is t_punctuation and p_invalid
// otherwise.
//
- Punctuation
+ punctuation_type
punctuation () const;
// Literals.
@@ -109,23 +109,22 @@ public:
public:
// EOS.
//
- Token (std::size_t l, std::size_t c);
+ token (std::size_t l, std::size_t c);
- Token (Keyword k, std::size_t l, std::size_t c);
- Token (Punctuation p, std::size_t l, std::size_t c);
+ token (keyword_type k, std::size_t l, std::size_t c);
+ token (punctuation_type p, std::size_t l, std::size_t c);
// Identifier, literals, and expressions.
//
- Token (Type t, std::string const& s, std::size_t l, std::size_t c);
+ token (token_type t, std::string const& s, std::size_t l, std::size_t c);
private:
std::size_t l_;
std::size_t c_;
- Type type_;
-
- Keyword keyword_;
- Punctuation punctuation_;
+ token_type type_;
+ keyword_type keyword_;
+ punctuation_type punctuation_;
std::string str_;
};