diff --git a/mode/clike/clike.js b/mode/clike/clike.js index cce41a470cfc246a0393d945493a9874a43e68cd..710953b2298a4629d0864d3517290a584ff17ea8 100644 --- a/mode/clike/clike.js +++ b/mode/clike/clike.js @@ -473,22 +473,17 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { def("text/x-objectivec", { name: "clike", - keywords: words("IBAction IBOutlet readwrite readonly nonatomic SEL" + - "super self copy if else for in enum while typedef switch case return " + - "const static retain"), - builtin: words("char bool BOOL double float int long short id void"), + keywords: words(cKeywords + "inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in " + + "inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"), atoms: words("YES NO NULL NILL ON OFF"), hooks: { "@": function(stream) { - stream.eatWhile(/[\w\$_]/); + stream.eatWhile(/[\w\$]/); return "keyword"; }, - "#": function(stream) { - stream.eatWhile(/[\w\$_]/); - return "keyword"; - } + "#": cppHook }, - modeProps: {fold: ["brace", "import"]} + modeProps: {fold: "brace"} }); }); diff --git a/mode/index.html b/mode/index.html index 576da6f1c39bf5be46c979b9e08005bfb5adcb3f..82bf03ae5178c09ad21db74967300f92312f2dc3 100644 --- a/mode/index.html +++ b/mode/index.html @@ -76,6 +76,7 @@ option.</p> <li><a href="modelica/index.html">Modelica</a></li> <li><a href="nginx/index.html">Nginx</a></li> <li><a href="ntriples/index.html">NTriples</a></li> + <li><a href="clike/index.html">Objective C</a></li> <li><a href="mllike/index.html">OCaml</a></li> <li><a href="octave/index.html">Octave</a> (MATLAB)</li> <li><a href="pascal/index.html">Pascal</a></li> diff --git a/mode/meta.js b/mode/meta.js index 7d28b8b9179091f32d7f5a7adecb0108a889ca04..94cf192976c878785773669e681ab628bae7502a 100644 --- a/mode/meta.js +++ b/mode/meta.js @@ -71,6 +71,7 @@ {name: "MySQL", mime: "text/x-mysql", mode: "sql"}, {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx"}, {name: "NTriples", mime: "text/n-triples", mode: "ntriples", ext: ["nt"]}, + {name: "Objective C", mime: "text/x-objectivec", mode: "clike", ext: ["m", "mm"]}, {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]}, {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]}, {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},