//-------------------------------------------------------------- void ofxEditorSyntax::clear() { lang = ""; clearAllFileExts(); singleLineComment = U""; multiLineCommentBegin = U""; multiLineCommentEnd = U""; preprocessor = U"#"; hexLiteral = true; operatorChars = U"=+-*/!|&~^"; punctuationChars = U";:,?"; clearAllWords(); }
//-------------------------------------------------------------- void ofxEditorSyntax::copy(const ofxEditorSyntax &from) { lang = from.lang; singleLineComment = from.singleLineComment; multiLineCommentBegin = from.multiLineCommentBegin; multiLineCommentEnd = from.multiLineCommentEnd; preprocessor = from.preprocessor; hexLiteral = from.hexLiteral; operatorChars = from.operatorChars; punctuationChars = from.punctuationChars; // make deep copies clearAllFileExts(); clearAllWords(); for(std::map<std::u32string,WordType>::const_iterator iter = from.words.begin(); iter != from.words.end(); ++iter) { words[(*iter).first] = (*iter).second; } for(std::set<std::string>::const_iterator iter = from.fileExts.begin(); iter != from.fileExts.end(); ++iter) { fileExts.insert((*iter)); } }