42 |
ecstacy::size_type token_line = this->line_; |
ecstacy::size_type token_line = this->line_; |
43 |
ecstacy::size_type token_column = this->column_; |
ecstacy::size_type token_column = this->column_; |
44 |
|
|
45 |
std::basic_string<char_type, traits_type> token_value; |
string_type token_value; |
46 |
while (1) { |
while (1) { |
47 |
c = this->next_char (); |
c = this->next_char (); |
48 |
switch (state) { |
switch (state) { |
57 |
} else if (traits_type::eq (c, ct.widen ('\n'))) { |
} else if (traits_type::eq (c, ct.widen ('\n'))) { |
58 |
token_value.push_back (c); |
token_value.push_back (c); |
59 |
return token (token::type_endl, token_value, token_line, token_column); |
return token (token::type_endl, token_value, token_line, token_column); |
60 |
|
} else if (traits_type::eq (c, ct.widen (';'))) { |
61 |
|
token_value.push_back (c); |
62 |
|
return token (token::type_semicolon, token_value, token_line, token_column); |
63 |
|
} else if (traits_type::eq (c, ct.widen ('%'))) { |
64 |
|
token_value.push_back (c); |
65 |
|
return token (token::type_command_begin, token_value, token_line, token_column); |
66 |
} else if (ct.is (std::ctype_base::alpha, c) || |
} else if (ct.is (std::ctype_base::alpha, c) || |
67 |
(traits_type::eq (c, ct.widen('_')))) { |
(traits_type::eq (c, ct.widen ('_')))) { |
68 |
token_value.push_back (c); |
token_value.push_back (c); |
69 |
state = 1; |
state = 1; |
70 |
} else if (traits_type::eq (c, ct.widen ('{'))) { |
} else if (traits_type::eq (c, ct.widen ('{'))) { |
71 |
token_value.push_back (c); |
token_value.push_back (c); |
72 |
return token (token::type_block_start, token_value, token_line, token_column); |
return token (token::type_block_begin, token_value, token_line, token_column); |
73 |
} else if (traits_type::eq (c, ct.widen ('}'))) { |
} else if (traits_type::eq (c, ct.widen ('}'))) { |
74 |
token_value.push_back (c); |
token_value.push_back (c); |
75 |
return token (token::type_block_end, token_value, token_line, token_column); |
return token (token::type_block_end, token_value, token_line, token_column); |