コード例 #1
0
ファイル: parser.cpp プロジェクト: RobertLeahy/UnicodePP
CodePoint::Type Parser::get_cp (const Item & item) {

	auto cp=item.CodePoint();
	if (!cp) throw std::runtime_error("Expected code point");
	
	return *cp;

}
コード例 #2
0
ファイル: casing.cpp プロジェクト: RobertLeahy/UnicodePP
void CasingParser::get_folding (Entry & entry, const Item & item) {

	entry.SimpleFolding=item.CodePoint();
	
	//	If the simple folding is still null,
	//	this line is malformed
	if (!entry.SimpleFolding) throw std::runtime_error("Expected code point");

}