about summary refs log tree commit diff stats
path: root/apidocs
Commit message (Expand)AuthorAgeFilesLines
* Update copyrightJames Booth2018-01-211-1/+1
* Update CopyrightJames Booth2017-01-281-1/+1
* Add pre chat and room message blockingJames Booth2017-01-222-6/+6
* Add chat and room show calls to plugins apiJames Booth2017-01-212-6/+134
* Allow room display properies to be set by pluginsJames Booth2017-01-202-7/+110
* Allow chat prefix char to be set by pluginsJames Booth2017-01-202-1/+92
* Add titlebar encryption text to plugins apiJames Booth2017-01-192-0/+48
* Add prof.encryption_reset to Plugins APIJames Booth2017-01-182-0/+34
* Allow filepath autocompletion in pluginsJames Booth2016-10-102-0/+21
* Add resource to chat message plugin hooksJames Booth2016-08-102-4/+10
* Rename plugin jid argumentsJames Booth2016-08-102-50/+50
* Fix type in python API docsJames Booth2016-08-081-2/+2
* Update plugin API docsJames Booth2016-08-072-16/+16
* Update plugin API docsJames Booth2016-08-025-4/+115
* Update gitignore, added python API docs MakefileJames Booth2016-08-021-0/+216
* Fixes to plugin API docsJames Booth2016-07-303-10/+8
* Update python API docsJames Booth2016-07-302-2/+5
* Update plugins API docsJames Booth2016-07-303-98/+184
* Update plugin API docsJames Booth2016-07-302-87/+193
* Update python API docsJames Booth2016-07-301-8/+2
* Update python API docsJames Booth2016-07-302-8/+250
* Fix type in python api docsJames Booth2016-07-301-1/+1
* Update python API docsJames Booth2016-07-301-35/+466
* Updates to python docsJames Booth2016-07-292-15/+22
* Add python plugin hook docsJames Booth2016-07-291-0/+119
* Add Python API docsJames Booth2016-07-294-0/+386
* Added doxygen settings for C plugin APIJames Booth2016-03-174-0/+2717
n class="o">: bar} <- copy 34 ] +parse: product: {"1": "number", "foo": "bar"} //: First augment next_word to group balanced brackets together. :(before "End next_word Special-cases") if (in.peek() == '(') return slurp_balanced_bracket(in); // treat curlies mostly like parens, but don't mess up labels if (start_of_dilated_reagent(in)) return slurp_balanced_bracket(in); :(code) // A curly is considered a label if it's the last thing on a line. Dilated // reagents should remain all on one line. // // Side-effect: This might delete some whitespace after an initial '{'. bool start_of_dilated_reagent(istream& in) { if (in.peek() != '{') return false; in.get(); // slurp '{' skip_whitespace(in); char next = in.peek(); in.putback('{'); return next != '\n'; } // Assume the first letter is an open bracket, and read everything until the // matching close bracket. // We balance {} () and []. And we skip one character after '\'. string slurp_balanced_bracket(istream& in) { ostringstream result; char c; list<char> open_brackets; while (in >> c) { if (c == '\\') { // always silently skip the next character result << c; if (!(in >> c)) break; result << c; continue; } if (c == '(') open_brackets.push_back(c); if (c == ')') { assert(open_brackets.back() == '('); open_brackets.pop_back(); } if (c == '[') open_brackets.push_back(c); if (c == ']') { assert(open_brackets.back() == '['); open_brackets.pop_back(); } if (c == '{') open_brackets.push_back(c); if (c == '}') { assert(open_brackets.back() == '{'); open_brackets.pop_back(); } result << c; if (open_brackets.empty()) break; } return result.str(); } :(after "Parsing reagent(string s)") if (s.at(0) == '{') { assert(properties.empty()); istringstream in(s); in >> std::noskipws; in.get(); // skip '{' while (!in.eof()) { string key = slurp_key(in); if (key.empty()) continue; if (key == "}") continue; string_tree* value = new string_tree(next_word(in)); // End Parsing Reagent Property(value) properties.push_back(pair<string, string_tree*>(key, value)); } // structures for the first row of properties name = properties.at(0).first; string type_name = properties.at(0).second->value; if (Type_ordinal.find(type_name) == Type_ordinal.end()) { // this type can't be an integer Type_ordinal[type_name] = Next_type_ordinal++; } type = new type_tree(Type_ordinal[type_name]); return; } :(code) string slurp_key(istream& in) { string result = next_word(in); while (!result.empty() && *result.rbegin() == ':') { strip_last(result); } return result; }