File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { useFile } from "../terminal/file";
1515
1616// セクション内に埋め込まれているターミナルとファイルエディターの内容をSection側から取得できるよう、
1717// Contextに保存する
18+ // TODO: C++では複数ファイルを実行する場合がありうるが、ここではfilenameを1つしか受け付けない想定になっている
1819interface ISectionCodeContext {
1920 addReplOutput : ( command : string , output : ReplOutput [ ] ) => void ;
2021 addFile : ( filename : string ) => void ;
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ export function ExecFile(props: ExecProps) {
108108 break ;
109109 }
110110 }
111- sectionContext ?. setExecResult ( props . filename ! , outputs ) ;
111+ // TODO: 1つのファイル名しか受け付けないところに無理やりコンマ区切りで全部のファイル名を突っ込んでいる
112+ sectionContext ?. setExecResult ( props . filenames . join ( "," ) , outputs ) ;
112113 } ;
113114 break ;
114115 default :
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default function PythonPage() {
2929 filename = "main.py"
3030 initContent = "print('hello, world!')"
3131 />
32- < ExecFile filename = "main.py" language = "python" content = "" />
32+ < ExecFile filenames = { [ "main.py" ] } language = "python" content = "" />
3333 </ div >
3434 ) ;
3535}
You can’t perform that action at this time.
0 commit comments