[#24] New language: Objective-C++
This commit is contained in:
parent
08ff7edaa4
commit
d87455995b
|
@ -2376,6 +2376,39 @@ int main() {
|
||||||
},
|
},
|
||||||
template: `#import <Foundation/Foundation.h>
|
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() {
|
int main() {
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
NSLog(@"Hello, world!");
|
NSLog(@"Hello, world!");
|
||||||
|
|
|
@ -58,6 +58,11 @@ make
|
||||||
gcc
|
gcc
|
||||||
gnustep-devel
|
gnustep-devel
|
||||||
|
|
||||||
|
Objective-C++
|
||||||
|
gcc
|
||||||
|
gnustep-devel
|
||||||
|
gobjc++
|
||||||
|
|
||||||
# OCaml
|
# OCaml
|
||||||
ocaml
|
ocaml
|
||||||
opam
|
opam
|
||||||
|
|
Loading…
Reference in New Issue