Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[mllike mode] Integrate

Add //-comment support for F#

Issue #2136
  • Loading branch information...
commit 53f3aba5bf1f7faf0fbef0ef5522970d5f4942e6 1 parent 4c07e0b
@marijnh marijnh authored
Showing with 12 additions and 5 deletions.
  1. +1 −1  doc/compress.html
  2. +2 −1  mode/index.html
  3. +9 −3 mode/mllike/mllike.js
View
2  doc/compress.html
@@ -114,9 +114,9 @@
<option value="http://codemirror.net/mode/lua/lua.js">lua.js</option>
<option value="http://codemirror.net/mode/markdown/markdown.js">markdown.js</option>
<option value="http://codemirror.net/mode/mirc/mirc.js">mirc.js</option>
+ <option value="http://codemirror.net/mode/mllike/mllike.js">mllike.js</option>
<option value="http://codemirror.net/mode/nginx/nginx.js">nginx.js</option>
<option value="http://codemirror.net/mode/ntriples/ntriples.js">ntriples.js</option>
- <option value="http://codemirror.net/mode/ocaml/ocaml.js">ocaml.js</option>
<option value="http://codemirror.net/mode/octave/octave.js">octave.js</option>
<option value="http://codemirror.net/mode/pascal/pascal.js">pascal.js</option>
<option value="http://codemirror.net/mode/pegjs/pegjs.js">pegjs.js</option>
View
3  mode/index.html
@@ -46,6 +46,7 @@
<li><a href="eiffel/index.html">Eiffel</a></li>
<li><a href="erlang/index.html">Erlang</a></li>
<li><a href="fortran/index.html">Fortran</a></li>
+ <li><a href="mllike/index.html">F#</a></li>
<li><a href="gas/index.html">Gas</a> (AT&amp;T-style assembly)</li>
<li><a href="gherkin/index.html">Gherkin</a></li>
<li><a href="go/index.html">Go</a></li>
@@ -68,7 +69,7 @@
<li><a href="mirc/index.html">mIRC</a></li>
<li><a href="nginx/index.html">Nginx</a></li>
<li><a href="ntriples/index.html">NTriples</a></li>
- <li><a href="ocaml/index.html">OCaml</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>
<li><a href="pegjs/index.html">PEG.js</a></li>
View
12 mode/mllike/mllike.js
@@ -57,6 +57,10 @@ CodeMirror.defineMode('mllike', function(_config, parserConfig) {
stream.eatWhile(/\w/);
return 'quote';
}
+ if (ch === '/' && parserConfig.slashComments && stream.eat('/')) {
+ stream.skipToEnd();
+ return 'comment';
+ }
if (/\d/.test(ch)) {
stream.eatWhile(/[\d]/);
if (stream.eat('.')) {
@@ -108,7 +112,8 @@ CodeMirror.defineMode('mllike', function(_config, parserConfig) {
},
blockCommentStart: "(*",
- blockCommentEnd: "*)"
+ blockCommentEnd: "*)",
+ lineComment: parserConfig.slashComments ? "//" : null
};
});
@@ -181,5 +186,6 @@ CodeMirror.defineMIME('text/x-fsharp', {
'not': 'builtin',
'true': 'builtin',
'false': 'builtin'
- }
-});
+ },
+ slashComments: true
+});
Please sign in to comment.
Something went wrong with that request. Please try again.