Михаил Капелько 1 개월 전
부모
커밋
110b44030d
7개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. +0
    -0
      _translator-C++-Swift/Function.py
  2. +0
    -0
      _translator-C++-Swift/Type.py
  3. +0
    -0
      _translator-C++-Swift/process.py
  4. +0
    -0
      _translator-C++-Swift/translate
  5. +0
    -0
      main-2.cpp
  6. +1
    -3
      main.py
  7. +10
    -0
      pythonToC++

translator-C++-Swift/Function.py → _translator-C++-Swift/Function.py 파일 보기


translator-C++-Swift/Type.py → _translator-C++-Swift/Type.py 파일 보기


translator-C++-Swift/process.py → _translator-C++-Swift/process.py 파일 보기


translator-C++-Swift/translate → _translator-C++-Swift/translate 파일 보기


+ 0
- 0
main-2.cpp 파일 보기


+ 1
- 3
main.py 파일 보기

@@ -3,9 +3,7 @@

# L4: Function.

def memory_generateConstPlayfield(
n: int
) -> dict[int, int]:
def memory_generateConstPlayfield(n: int) -> dict[int, int]:
idGroups: dict[int, int] = { }
id = 0
for gid in range(0, n):


+ 10
- 0
pythonToC++ 파일 보기

@@ -0,0 +1,10 @@
IN=main.py
OUT=main-2.cpp

# Simple check. TODO REMOVE later
sed 's|# L4: Function.|// L4: Function.|' $IN > $OUT

# dict[X, Y] -> std::map<X, Y>
sed -E 's|dict\[(.*), (.*)\]|std::map<\1, \2>|' $IN > $OUT
# def functionName(X) -> Y -> Y functionName(X) {
sed -E 's|def (.*) -> (.*):|\2 \1 {|' $OUT > $OUT

불러오는 중...
취소
저장