[#24] New language: Objective-C++

This commit is contained in:
Radon Rosborough 2020-10-05 18:45:52 -07:00
parent 08ff7edaa4
commit d87455995b
2 changed files with 38 additions and 0 deletions

View File

@ -2376,6 +2376,39 @@ int main() {
},
template: `#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Hello, world!");
[pool drain];
return 0;
}
`,
skip: ["lsp"],
},
"objectivec++": {
aliases: ["objc++", "objcpp", "objectivecpp"],
name: "Objective-C++",
main: "main.mm",
compile: "gcc $(gnustep-config --objc-flags) main.mm $(gnustep-config --base-libs) -o main",
run: "./main",
format: {
run: "clang-format --assume-filename=format.m",
input: `#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Hello, world!");
[pool drain];
return 0;
}
`,
},
lsp: {
setup: `(gnustep-config --objc-flags && gnustep-config --base-libs) | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
start: "clangd",
},
template: `#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Hello, world!");

View File

@ -58,6 +58,11 @@ make
gcc
gnustep-devel
Objective-C++
gcc
gnustep-devel
gobjc++
# OCaml
ocaml
opam