d
This commit is contained in:
@@ -4,6 +4,7 @@ def includes():
|
||||
return """#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "memory.h"
|
||||
#include "memory_Context.h"
|
||||
"""
|
||||
|
||||
@@ -47,6 +48,7 @@ def translateStatement(s, state):
|
||||
ss = s.lstrip()
|
||||
posColon = ss.find(": ")
|
||||
posComma = ss.find(", ")
|
||||
posComment = ss.find("# ")
|
||||
posCtx = ss.find("c.")
|
||||
posEqual = ss.find(" = ")
|
||||
posFor = ss.find("for ")
|
||||
@@ -56,6 +58,10 @@ def translateStatement(s, state):
|
||||
posClosingScope = ss.find("#}")
|
||||
posOpenSquareBracket = ss.find("[")
|
||||
|
||||
# # -> //
|
||||
if posComment != -1:
|
||||
return replaceComment(s)
|
||||
|
||||
# #} -> }
|
||||
if posClosingScope != -1:
|
||||
return f"{indentation}}}"
|
||||
|
||||
Reference in New Issue
Block a user