Пример #1
0
void CParseTreeNode::MakeAction(int action_constant)
{
	assert(TokenIsOpenPPLAction(action_constant));
  CString action_name = TokenString(action_constant);
  assert(action_name != "");
  MakeIdentifier(action_name);
}
Пример #2
0
//----------------------------------------------------------------//
int MOAIPathDictionary::GetIdentifier(const char path[])
{
	size_t pathLength;
	unsigned int pathHash = GetHash(path, &pathLength);
	int id = FindIdentifierRelative(pathHash, path);
	if (id < 0)
	{
		std::string absPathStr = ZLFileSys::GetAbsoluteFilePath(path);
		size_t absPathLength;
		unsigned int absPathHash = GetHash(absPathStr.c_str(), &absPathLength);
		id = FindIdentifierAbsolute(absPathHash, absPathStr.c_str());
		if (id < 0)
		{
			id = MakeIdentifier(absPathStr.c_str(), absPathLength);
			SetIdentifier(absPathHash, -1, id);
		}
		int idRel = MakeIdentifier(path, pathLength);
		SetIdentifier(pathHash, idRel, id);
	}
	return id;
}