diff options
Diffstat (limited to 'src/parser.h')
-rw-r--r-- | src/parser.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h index b502f46..b18e13c 100644 --- a/src/parser.h +++ b/src/parser.h @@ -333,6 +333,17 @@ namespace States { extern State *current; static inline bool + is_start() + { + /* + * The "escape" state exists only as a hack, + * to support $$. Otherwise it should behave + * like the start state. + */ + return current == &start || current == &escape; + } + + static inline bool is_string() { return dynamic_cast<StateExpectString *>(current); |