예제 #1
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddString(int key, const string& value)
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	lua_pushnumber(L, key);
	lua_pushstring(L, value.c_str());
	PushParam();
}
예제 #2
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddBool(int key, bool value)
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	lua_pushnumber(L, key);
	lua_pushboolean(L, value);
	PushParam();
}
예제 #3
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddFloat(int key, float value)
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	lua_pushnumber(L, key);
	lua_pushnumber(L, value);
	PushParam();
}
예제 #4
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddFloat(const string& key, float value)
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	lua_pushstring(L, key.c_str());
	lua_pushnumber(L, value);
	PushParam();
}
예제 #5
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddBool(const string& key, bool value)
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	lua_pushstring(L, key.c_str());
	lua_pushboolean(L, value);
	PushParam();
}
예제 #6
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::EndTable()
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	assert(initDepth > 0);
	initDepth--;
	PushParam();
}
예제 #7
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddFunc(int key, int (*func)(lua_State*))
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	if (func == NULL) { return; }
	lua_pushnumber(L, key);
	lua_pushcfunction(L, func);
	PushParam();
}
예제 #8
0
파일: LuaParser.cpp 프로젝트: Dmytry/spring
void LuaParser::AddFunc(const string& key, int (*func)(lua_State*))
{
	if ((L == NULL) || (initDepth < 0)) { return; }
	if (func == NULL) { return; }
	lua_pushstring(L, key.c_str());
	lua_pushcfunction(L, func);
	PushParam();
}
예제 #9
0
void PushParam(TreeNode* pnode){
	if (pnode->sibling!=NULL){
		PushParam(pnode->sibling);
	}

	HandleNodeExp(pnode);
	EMITCODE("pushl %eax\n");
}
예제 #10
0
void HandleProcExc(TreeNode* pnode){
	ProcList varList=procListLookup(pnode->attr.name);
	PushParam(pnode->child[0]);
	EMITCODE("pushl %ecx\n");  
	EMITCODE("movl %esp, %ecx\n");
	sprintf(tmp, "call %s\n", pnode->attr.name);
	EMITCODE(tmp);
	EMITCODE("popl %ecx\n");
	PopParam(pnode->child[0],varList->paraList);
}