PropertyToken.hpp
Go to the documentation of this file.
1 // @formatter:off
2 //
3 // Balau core C++ library
4 //
5 // Copyright (C) 2017 Bora Software (contact@borasoftware.com)
6 //
7 // Licensed under the Boost Software License - Version 1.0 - August 17th, 2003.
8 // See the LICENSE file for the full license text.
9 //
10 
16 
17 #ifndef COM_BORA_SOFTWARE__BALAU_LANG_PROPERTY_LANG__PROPERTY_TOKEN
18 #define COM_BORA_SOFTWARE__BALAU_LANG_PROPERTY_LANG__PROPERTY_TOKEN
19 
20 #include <Balau/Type/ToString.hpp>
21 
22 namespace Balau::Lang::Property {
23 
25 
29 enum class PropertyToken : unsigned char {
30  OpenCurly
31  , CloseCurly
32  , Arobase
33  , Colon
34  , Equals
35  , Blank
36  , LineBreak
37  , Hash
38  , Exclamation
39  , EndOfFile
40 
41  , Text
42  , BackSlash
43 
44  , EscapedOpenCurly
45  , EscapedCloseCurly
46  , EscapedArobase
47  , EscapedColon
48  , EscapedEquals
49  , EscapedHash
50  , EscapedExclamation
51  , EscapedBackSlash
52  , EscapedBlank
53  , EscapedChar
54  , EscapedLineBreak
55 
56  // Required for scanner
57  , CommentBlock
58  , CommentLine
59 };
60 
66 std::string toString(const PropertyToken & token);
67 
73 template <typename AllocatorT>
75  return toString<AllocatorT>(toString(token));
76 }
77 
78 } // namespace Balau::Lang::Css
79 
80 #endif // COM_BORA_SOFTWARE__BALAU_LANG_PROPERTY_LANG__PROPERTY_TOKEN
Pre-defined universal to-string functions.
PropertyToken
Property language tokens.
Definition: PropertyToken.hpp:29
std::string toString(const PropertyToken &token)
Print the property token as a UTF-8 string.
Definition: PropertyToken.hpp:74
std::basic_string< char, std::char_traits< char >, AllocatorT > U8String
UTF-8 string type with selectable allocator.
Definition: ToStringA.hpp:41
The Property parser.