diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-19 15:36:03 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-19 15:36:03 -0500 |
commit | 8916c6911c23ca7ff7e78a90b30a295c2b9b9c22 (patch) | |
tree | e5f22f29edf845960e435a44220bf613d2baa24f /lib | |
parent | 49d6f0387f7b7cc3c6a51ef8fcdf519da98487f6 (diff) | |
download | verbly-8916c6911c23ca7ff7e78a90b30a295c2b9b9c22.tar.gz verbly-8916c6911c23ca7ff7e78a90b30a295c2b9b9c22.tar.bz2 verbly-8916c6911c23ca7ff7e78a90b30a295c2b9b9c22.zip |
Added method to check if a token is empty
Diffstat (limited to 'lib')
-rw-r--r-- | lib/token.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/token.h b/lib/token.h index f3188c9..a4072e0 100644 --- a/lib/token.h +++ b/lib/token.h | |||
@@ -50,6 +50,11 @@ namespace verbly { | |||
50 | 50 | ||
51 | std::string compile() const; | 51 | std::string compile() const; |
52 | 52 | ||
53 | bool isEmpty() const | ||
54 | { | ||
55 | return ((type_ == type::utterance) && (utterance_.empty())); | ||
56 | } | ||
57 | |||
53 | // Word | 58 | // Word |
54 | 59 | ||
55 | token(word arg, inflection category = inflection::base); | 60 | token(word arg, inflection category = inflection::base); |