mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Add .cl as a Common Lisp file extension.
This commit is contained in:
@@ -281,6 +281,7 @@ Common Lisp:
|
|||||||
primary_extension: .lisp
|
primary_extension: .lisp
|
||||||
extensions:
|
extensions:
|
||||||
- .asd
|
- .asd
|
||||||
|
- .cl
|
||||||
- .lsp
|
- .lsp
|
||||||
- .ny
|
- .ny
|
||||||
- .podsl
|
- .podsl
|
||||||
|
|||||||
21
samples/Common Lisp/sample.lisp
Normal file
21
samples/Common Lisp/sample.lisp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
;;;; -*- lisp -*-
|
||||||
|
|
||||||
|
(in-package :foo)
|
||||||
|
|
||||||
|
;;; Header comment.
|
||||||
|
(defvar *foo*)
|
||||||
|
|
||||||
|
(eval-when (:execute :compile-toplevel :load-toplevel)
|
||||||
|
(defun add (x &optional y &key z)
|
||||||
|
(declare (ignore z))
|
||||||
|
;; Inline comment.
|
||||||
|
(+ x (or y 1))))
|
||||||
|
|
||||||
|
#|
|
||||||
|
Multi-line comment.
|
||||||
|
|#
|
||||||
|
|
||||||
|
(defmacro foo (x &body b)
|
||||||
|
(if x
|
||||||
|
`(1+ ,x) ;After-line comment.
|
||||||
|
42))
|
||||||
23
samples/OpenCL/sample.cl
Normal file
23
samples/OpenCL/sample.cl
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/* Old-style comment. */
|
||||||
|
|
||||||
|
// New-style comment.
|
||||||
|
|
||||||
|
typedef float foo_t;
|
||||||
|
|
||||||
|
#ifndef ZERO
|
||||||
|
#define ZERO (0.0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define FOO(x) ((x) + \
|
||||||
|
ZERO)
|
||||||
|
|
||||||
|
__kernel
|
||||||
|
void foo(__global const foo_t * x, __local foo_t y, const uint n)
|
||||||
|
{
|
||||||
|
barrier(CLK_LOCAL_MEM_FENCE);
|
||||||
|
|
||||||
|
if (n > 42) {
|
||||||
|
*x += y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user