add support for executing C++ code (#212)

This commit is contained in:
Kerdo Kurs
2023-03-01 19:19:34 +02:00
committed by GitHub
parent fbdd21edee
commit 9e3e13ef3d
2 changed files with 19 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ const (
Rust = "rust"
Java = "java"
Julia = "julia"
Cpp = "cpp"
)
// Languages is a map of supported languages with their extensions and commands
@@ -81,4 +82,11 @@ var Languages = map[string]Language{
Extension: "jl",
Commands: cmds{{"julia", "<file>"}},
},
Cpp: {
Extension: "cpp",
Commands: cmds{
{"g++", "-std=c++20", "-o", "<path>/<name>.run", "<file>"},
{"<path>/<name>.run"},
},
},
}