d
This commit is contained in:
@@ -3,7 +3,8 @@ from Function import *
|
||||
def includes():
|
||||
return """#include <map>
|
||||
#include <string>
|
||||
#include "entities.h"
|
||||
#include <vector>
|
||||
#include "memory_Context.h"
|
||||
"""
|
||||
|
||||
def replaceAnd(s):
|
||||
@@ -91,6 +92,11 @@ def translateStatement(s, state):
|
||||
state.isIf = True
|
||||
return s
|
||||
|
||||
# Keep "if not ("
|
||||
if ss == "if not (":
|
||||
state.isIf = True
|
||||
return f"{indentation}if !("
|
||||
|
||||
# ): -> }
|
||||
if ss == "):":
|
||||
state.isIf = False
|
||||
@@ -129,8 +135,8 @@ class CPP:
|
||||
for i in range(0, len(self.fn.parameters)):
|
||||
p = translateParameter(self.fn.parameters[i])
|
||||
# Make Context passed by reference.
|
||||
if "Context" in p:
|
||||
p = p.replace("Context", "Context&")
|
||||
#if "Context" in p:
|
||||
# p = p.replace("Context", "Context&")
|
||||
params.append(p)
|
||||
strparams = "\n".join(params)
|
||||
if (len(strparams) > 0):
|
||||
|
||||
Reference in New Issue
Block a user