From 617155fe562652c859a380d85cc5710783d79448 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 1 Feb 2016 09:30:04 -0500 Subject: Added emoji freevar Strings of emojis are tokenized separately from anything else, and added to an emoticon freevar, which is mixed in with regular emoticons like :P. This breaks old-style freevars like $name$ and $noun$ so some legacy support for compatibility is left in but eventually $name$ should be made into an actual new freevar. Emoji data is from gemoji (https://github.com/github/gemoji). --- freevars.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'freevars.h') diff --git a/freevars.h b/freevars.h index c92b9f5..f800220 100644 --- a/freevars.h +++ b/freevars.h @@ -1,19 +1,22 @@ -#include #include -#include +#include #ifndef FREEVARS_H #define FREEVARS_H -class freevars +class word; + +class freevar { -public: - freevars(); - void addVar(std::string name, std::string filename); - std::string parse(std::string in); + public: + freevar(word& w, std::string file); + bool check(std::string f) const; + void add(std::string f); + word& getWord(); -private: - std::map* >* vars; + private: + word& w; + std::set instances; }; #endif \ No newline at end of file -- cgit 1.4.1