|
Revision 28939ac15506b95f59142a06b7d6794a801f8198, 1.3 KB
(checked in by Antti-Juhani Kaijanaho <antti-juhani@…>, 21 months ago)
|
|
Allow templates access to literal special characters
The variable "_" refers by default now to a structured value having
the following members:
- hash containing "#"
- dollar containing "$"
- obrace containing "{"
- cbrace containing "}"
So, for example, $_.dollar$ in a template will, in general, expand to
the dollar sign.
Closes #75.
Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@…>
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | #ifndef GUARD_TLATE_STD_VALUE_HH |
|---|
| 21 | #define GUARD_TLATE_STD_VALUE_HH |
|---|
| 22 | |
|---|
| 23 | #include "structured_value.hh" |
|---|
| 24 | |
|---|
| 25 | namespace tlate |
|---|
| 26 | { |
|---|
| 27 | class std_value : public structured_value |
|---|
| 28 | { |
|---|
| 29 | public: |
|---|
| 30 | typedef boost::shared_ptr<std_value> ptr; |
|---|
| 31 | typedef boost::shared_ptr<const std_value> const_ptr; |
|---|
| 32 | |
|---|
| 33 | value::const_ptr get(std::string) const; |
|---|
| 34 | |
|---|
| 35 | static const std_value::const_ptr singleton; |
|---|
| 36 | private: |
|---|
| 37 | std_value() {} |
|---|
| 38 | }; |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | #endif |
|---|