├── .gitignore ├── CHANGELOG.md ├── package.json ├── .gitattributes ├── settings └── common-lisp.cson ├── test ├── flow-control.lisp ├── structs-n-classes.lisp ├── variables.lisp ├── numeric.lisp └── test.lisp ├── LICENSE.md ├── README.md ├── grammars └── lisp.cson └── lisplogo_alien.svg /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.0 - First Release 2 | * Every feature added 3 | * Every bug fixed 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-common-lisp", 3 | "version": "0.9.0", 4 | "description": "Common Lisp Highlighting & Support in Atom", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/serialhex/language-common-lisp" 8 | }, 9 | "license": "MIT", 10 | "engines": { 11 | "atom": ">0.5.0" 12 | }, 13 | "readmeFilename": "README.md", 14 | "dependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /settings/common-lisp.cson: -------------------------------------------------------------------------------- 1 | ".source.common.lisp": 2 | editor: 3 | commentStart: ";" 4 | increaseIndentPattern: '^.*\\(.*[^)"]$' 5 | 6 | 7 | # increasing indent and such... 8 | # 9 | # 'increaseIndentPattern': '\\b(else|elseif|(local\\s+)?function|then|do|repeat)\\b((?!end).)*$|\\{\\s*$' 10 | # 'decreaseIndentPattern': '^\\s*(elseif|else|end|until,?|\\}\\)?).*$' 11 | # 12 | # 'increaseIndentPattern': '(?x) 13 | # ^ .* \\{ [^}"\']* $ 14 | # |^ .* \\( [^\\)"\']* $ 15 | # |^ \\s* \\{ \\} $ 16 | # ' 17 | # 'decreaseIndentPattern': '(?x) 18 | # ^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\} 19 | # |^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\) 20 | # ' 21 | # 'tabLength': 4 22 | # 'softTabs': true 23 | # 'preferredLineLength': 99 24 | -------------------------------------------------------------------------------- /test/flow-control.lisp: -------------------------------------------------------------------------------- 1 | ; all the flow-controlling!! 2 | ; well... besides do & family and loop... 3 | (if (test) 4 | foo) 5 | (cond 6 | (test then) 7 | (test2 then2)) 8 | (when (test) 9 | stuff) 10 | (unless (test) 11 | stuff) 12 | (case (test) 13 | (key foo*) 14 | (otherwise bar)) 15 | (ecase test 16 | ) 17 | (ccase test 18 | ) 19 | 20 | (and test test2) 21 | (or test test2) 22 | 23 | (progn foos) 24 | (multiple-value-prog1 foos) 25 | (prog1 bars) 26 | (prog2 bazs) 27 | 28 | (prog foo) 29 | (prog* bar) 30 | 31 | (unwind-protect (protected) 32 | (cleanup 'but-i-dont-wanna!!!)) 33 | 34 | (block name form) 35 | 36 | (return-from foo) 37 | (return) 38 | 39 | (tagbody 'meh) 40 | (go 'meh) 41 | 42 | (catch 'moo) 43 | (throw 'milk) 44 | 45 | (sleep *forever*) 46 | -------------------------------------------------------------------------------- /test/structs-n-classes.lisp: -------------------------------------------------------------------------------- 1 | ;; structs and classes!! 2 | 3 | (defstruct point 4 | x 5 | y 6 | z) 7 | 8 | (defstruct ship 9 | (x-position 0.0 :type short-float) 10 | (y-position 0.0 :type short-float) 11 | (x-velocity 0.0 :type short-float) 12 | (y-velocity 0.0 :type short-float) 13 | (mass *default-ship-mass* :type short-float :read-only t)) 14 | 15 | (defstruct (door (:conc-name dr-)) 16 | knob-color 17 | width material) 18 | 19 | (defstruct (astronaut (:include person) 20 | (:conc-name astro-)) 21 | helmet-size 22 | (favorite-beverage 'tang)) 23 | 24 | 25 | (defclass point () 26 | (x 27 | y 28 | z)) 29 | 30 | (defclass daft-point () 31 | ((x :accessor daft-x :initarg :x) 32 | (y :accessor daft-y :initform 3.14159) 33 | (z :reader daft-z :allocation :class))) 34 | -------------------------------------------------------------------------------- /test/variables.lisp: -------------------------------------------------------------------------------- 1 |  2 | 3 | (defparameter foo form) 4 | (defconstant foo form) 5 | (defvar foo form 6 | "document") 7 | 8 | (setf place form 9 | place2 form4) 10 | 11 | (psetf plae moo 12 | plz foo) 13 | 14 | (setq symbol form 15 | sym formation) 16 | 17 | (psetq same thing) 18 | 19 | (set symbol foo) 20 | 21 | (multiple-value-setq vars form) 22 | 23 | (shiftf place foo) 24 | (rotatef place) 25 | 26 | (makunbound foof) 27 | 28 | (get symbol key) 29 | (getf place key) 30 | 31 | (get-properties property-list keys) 32 | (remprop symbol key) 33 | (remf place key) 34 | 35 | (progv symbols values formP∗) 36 | 37 | (let (name) 38 | forms) 39 | (let* (name) 40 | forms) 41 | 42 | 43 | (multiple-value-bind (var d∗) values-form (declare decl d∗) 44 | body-form) 45 | 46 | (destructuring-bind (destruct-λ) bar (declare decl d∗) 47 | forms) 48 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Justin Patera 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Common Lisp Highlighting & Support in Atom 2 | 3 | An awesome package lovingly created to support proper syntax highlighting of 4 | Common Lisp files. 5 | 6 | This is *not* converted from the Textmate Bundle, and therefore does not have 7 | the shortcomings of said bundle! 8 | 9 | ## Warning: 10 | There are some flaws in parsing lambda-lists, especially ones with `&optional (foo "bar")` 11 | type things in it. Since parsing that is *not* regular (I don't think) I am probably 12 | going to have to re-write it in an *actual* language. So just be careful and let 13 | me know if you know how to fix it! Thanks! :-D 14 | 15 | ## TODO: 16 | * Get Complex numbers `#c(5.0 3/2)` working properly. 17 | * Remove a lot of the scheme/Racket-isms that are in the code, as I have use a *LOT* 18 | of their regexes to jump-start this work. 19 | * Get `loop` and all of it's keywords working just fine. 20 | * Set the read-macro regex, especially for pathnames 21 | * Fix typing the single quote character `'` so it doesn't auto-fill a second one 22 | * Other stuff I haven't thought of yet... 23 | 24 | 25 | ![Lisp](https://cdn.rawgit.com/serialhex/language-common-lisp/eaae981b68cff11951f296174f1248f03c7e1083/lisplogo_alien.svg) 26 | -------------------------------------------------------------------------------- /test/numeric.lisp: -------------------------------------------------------------------------------- 1 | ;; Predicates 2 | (= number) 3 | (/= number+) 4 | (> number +) 5 | (>= number +) 6 | (< number +) 7 | (<= number +) 8 | 9 | (minusp a) 10 | (zerop a) 11 | (plusp a) 12 | 13 | (evenp int) 14 | (oddp int) 15 | 16 | (numberp foo) 17 | (NUMBERP FOO) 18 | (realp foo) 19 | (rationalp foo) 20 | (floatp foo) 21 | (integerp foo) 22 | (complexp foo) 23 | (random-state-p foo) 24 | 25 | ;; Numeric Functions 26 | (+ a 0) 27 | (∗ a 1) 28 | (– a b∗) 29 | (/ a b∗) 30 | 31 | (1+ a) 32 | (1– a) 33 |  34 | (incf foo) 35 | (decf bar) 36 | 37 | (exp p) 38 | (expt b p) 39 | (log a) 40 | (sqrt n) 41 | (isqrt n) 42 | 43 | (lcm integer∗) 44 | (gcd integer∗) 45 | 46 | (sin a) 47 | (cos a) 48 | (tan a) 49 | 50 | (asin a) 51 | (acos a) 52 | 53 | (atan a [b 1]) 54 | (sinh a) 55 | (cosh a) 56 | (tanh a) 57 | 58 | (asinh a) 59 | (acosh a) 60 | (atanh a) 61 | 62 | (cis a) 63 | (conjugate a) 64 | (max num+) 65 | (min num+) 66 | 67 | (round n) 68 | (fround f) 69 | (floor f) 70 | (ffloor f) 71 | (ceiling f) 72 | (fceiling n) 73 | (truncate f) 74 | (ftruncate b) 75 |  76 | (mod) 77 | (rem) 78 | 79 | (random num) 80 | (make-random-state) 81 | ∗random-state∗ 82 | 83 | (float-sign num-a) 84 | (signum n) 85 | 86 | (numerator rational) 87 | (denominator rational) 88 | 89 | (realpart number) 90 | (imagpart number) 91 | 92 | (complex real) 93 | (phase num) 94 | (abs n) 95 | (rational real) 96 | (rationalize real) 97 | 98 | (float real) 99 | 100 | ; Boolean 101 | -------------------------------------------------------------------------------- /test/test.lisp: -------------------------------------------------------------------------------- 1 | 2 | ; single-line comment 3 | 4 | #| 5 | multiline 6 | comment 7 | (defun meh () 8 | 'llama) 9 | |# 10 | 11 | #p"llama:" 12 | #P"mmoooo" 13 | #P"C:\\am\\a/long filepath" 14 | #\f ; character 15 | #\" ;a quote character! 16 | #\0 17 | #\Space 18 | #\Newline 19 | #\Rubout 20 | #\Page 21 | #\Tab 22 | #\Backspace 23 | #\Return 24 | #\Linefeed 25 | #\Mooberry ; bad character! 26 | 27 | t 28 | nil 29 | true 30 | nilhism 31 | 32 | :keyword 33 | :nil-word 34 | 35 | 710 ; int 36 | -1 ; int 37 | 9. ; yes, int: clhs 2.3.1 Numbers as Tokens 38 | 1/3 ; ratio 39 | -2/3 ; ratio 40 | -3.5 ; float 41 | 1.0D0 ; float 42 | .9 ; float 43 | -.8 ; float 44 | 1f0 ; float 45 | 4.S-5 ; float 46 | -.6l7 ; float 47 | 1.0e-15 ; float 48 | #B101100 ; binary 49 | #b091100 ; bad binary 50 | #o12357 ; octal 51 | #O8675309() ; bad octal 52 | #XaBcD56 ; hex 53 | #xz632g ; bad hex 54 | #6rmoO92 ; this would be way complicated... 55 | #35RfD45 ; all the digits 56 | #37r2hfy ; bad random radix 57 | #c(6f-3 -9/8) ; complex numbers yo! 58 | #C(0.7 8.6 3/6) ; bad complex number 59 | 60 | 'symbol 61 | 'sym5 62 | #'function-symbol 63 | (quote list of 4 symbols) 64 | '(list of 3 symbols?) 65 | '() 66 | "moo(man) 4 " 67 | sym5 68 | 69 | (defun foo->quix (foo) 70 | "i change foos into quixs" 71 | (declare (ignore foo)) 72 | 'quix) 73 | 74 | (defmacro zip (moo &lapsm (llama 909)) 75 | ;; 76 | 'quix 77 | ) 78 | 79 | (defmacro bar (baz &rest quix) 80 | "string for documentationz" 81 | macro!) 82 | 83 | (defun foo (bar) 84 | ( ;mooo 85 | 1/3 ) 86 | (princ bar)) 87 | 88 | (def4-llama.!~? thing (poop) 89 | '(poop llama) 90 | (+ 5 poop)) 91 | 92 | (lambda (llama llama moo) 93 | '(poop llama)) 94 | 95 | (defsomething thing (meh) 96 | "I define somethings") 97 | 98 | '(i am a quoted list) 99 | 100 | #P"C:\\am\\a/long filepath" 101 | 102 | (mop ) 103 | (mop-p ) 104 | -------------------------------------------------------------------------------- /grammars/lisp.cson: -------------------------------------------------------------------------------- 1 | name: "Common Lisp" 2 | scopeName: "source.common.lisp" 3 | comment: ''' 4 | 5 | Awesome Syntax Highlighting for Common Lisp! 6 | 7 | ''' 8 | 9 | fileTypes: [ 10 | 'lisp' 11 | 'lsp' 12 | 'asd' 13 | 'cl' 14 | 'l' 15 | 'mud' 16 | 'el' 17 | ] 18 | 19 | foldingStartMarker: '\\(\\s*$' 20 | foldingStopMarker: '^\\s*\\)' 21 | 22 | patterns: [ 23 | { 24 | include: "#comment" 25 | } 26 | { 27 | include: "#quote" 28 | } 29 | { 30 | include: "#sexp" 31 | } 32 | { 33 | include: "#string" 34 | } 35 | { 36 | include: "#language-functions" 37 | } 38 | { 39 | include: "#constants" 40 | } 41 | { 42 | include: "#illegal" 43 | } 44 | ] 45 | 46 | 47 | repository: 48 | comment: 49 | patterns: [ 50 | { 51 | captures: 52 | "1": 53 | name: "punctuation.definition.comment.common.lisp" 54 | match: "(;).*$\\n?" 55 | name: "comment.line.semicolon.common.lisp" 56 | } 57 | { 58 | begin: "#\\|" 59 | captures: 60 | "0": 61 | name: "punctuation.definition.comment.common.lisp" 62 | end: "\\|#" 63 | name: "comment.multiline.common.lisp" 64 | } 65 | ] 66 | constants: 67 | patterns: [ 68 | { 69 | match: '\\b(t|nil)(?=[\\s;()\'"\\]\\}])' 70 | name: "constant.language.boolean.common.lisp" 71 | } 72 | { 73 | match: "[\\s](:)([^\\s\\)]*)(?=[\\s\\)])" 74 | name: "constant.keyword.common.lisp" 75 | } 76 | # { 77 | # match: { 78 | # begin: '(#[cC]\\()' 79 | # end: '(\\))(?=[\\s;()\'"\\]\\}])' 80 | # } 81 | # name: "constant.numeric.complex.common.lisp" 82 | # } 83 | { 84 | include: "#numeric" 85 | } 86 | ] 87 | numeric: 88 | patterns: [ 89 | { 90 | match: '(?|<)?=|>|<|minusp|zerop|plusp|evenp|oddp|numberp|realp| 143 | rationalp|floatp|integerp|complexp|random-state-p| 144 | ([[:alpha:]][[:alnum:]!$%&*+-./:<=>?@^_~]*-p) # all `-p` 145 | ) 146 | (?=(\\s|\\()) # followed by space or ( 147 | ''' 148 | name: "support.function.boolean-test.common.lisp" 149 | } 150 | # { 151 | # comment: ''' 152 | # 153 | # These functions change one type into another. 154 | # 155 | # ''' 156 | # match: ''' 157 | # (?xi) 158 | # (?<=(\\s|\\()) # preceded by space or ( 159 | # ( char->integer|exact->inexact|inexact->exact| 160 | # integer->char|symbol->string|list->vector| 161 | # list->string|identifier->symbol|vector->list| 162 | # string->list|string->number|string->symbol| 163 | # number->string 164 | # ) 165 | # (?=(\\s|\\()) # followed by space or ( 166 | # 167 | # ''' 168 | # name: "support.function.convert-type.common.lisp" 169 | # } 170 | { 171 | comment: ''' 172 | 173 | These functions either generate, or effect bindings. 174 | Unfortunately the `pset(f|q)` functions and `defparameter` don't 175 | seem to highlight... which is weird! 176 | 177 | ''' 178 | match: ''' 179 | (?xi) 180 | (?<=(\\s|\\()) # preceded by space or ( 181 | ( (p)?set(f|q)?|def(constant|var|parameter)|multiple-value-setq| 182 | shiftf|rotatef|makunbound|get(f)?|get-properties|remprop|remf| 183 | progv|let(\\*)?|multiple-value-bind|destructuring-bind) 184 | (?=(\\s|\\()) # followed by space or ( 185 | ''' 186 | name: "storage.control.bindings.common.lisp" 187 | } 188 | { 189 | comment: "numeric functions" 190 | match: ''' 191 | (?xi) 192 | (?<=(\\s|\\()) 193 | # general numeric functions 194 | ([*/+-]|1(\\+|-)|incf|decf|exp|expt|log|sqrt|isqrt|lcm|gcd| 195 | sin|cos|tan|asin|acos|atan|sinh|cosh|tanh|asinh|acosh| 196 | atanh|cis|conjugate|max|min|round|fround|floor|ffloor| 197 | ceiling|fceiling|truncate|ftruncate|mod|rem|random|make| 198 | float|signum|numerator|denominator|realpart|imagpart| 199 | complex|phase|abs|rational|rationalize|float 200 | ) 201 | (?=(\\s|\\()) 202 | ''' 203 | name: "keyword.operator.numeric.common.lisp" 204 | } 205 | { 206 | match: ''' 207 | (?xi) 208 | (?<=(\\s|\\()) # preceded by space or ( 209 | ( append|apply|approximate| 210 | construct-identifier|display| 211 | funcall|force|cd|gen-counter|gen-loser| 212 | generate-identifier|last-pair|length| 213 | list|list-ref|list-tail|load|log| 214 | macro|magnitude|map|map-streams|max|member|memq| 215 | memv|min|newline|nil|not|peek-char|rationalize| 216 | read|read-char|return|reverse|sequence|substring| 217 | truncate|values-list|write|write-char| 218 | 219 | # cons, car, cdr, etc 220 | cons|c(a|d){1,4}r| 221 | 222 | # ports / files 223 | call-with-(?:input|output)-file| 224 | (?:close|current)-(?:input|output)-port| 225 | with-(?:input|output)-from-file| 226 | open-(?:input|output)-file| 227 | 228 | # char-«foo» 229 | char-(?:downcase|upcase|ready)| 230 | 231 | # make-«foo» 232 | make-(?:polar|promise|rectangular|string|vector) 233 | 234 | # string-«foo», vector-«foo» 235 | string(?:-(?:append|copy|length|ref))? 236 | ) 237 | (?=(\\s|\\()) # followed by space or ( 238 | ''' 239 | name: "support.function.general.common.lisp" 240 | } 241 | ] 242 | # end of set it up... 243 | quote: 244 | patterns: [ 245 | { 246 | comment: "Quoted symbol 'foo" 247 | captures: 248 | "1": 249 | name: "punctuation.section.quoted.symbol.common.lisp" 250 | match: "(')\\s*([0-9a-zA-Z!$%&*+-./:<=>?@^_~]+)" 251 | name: "constant.symbol.common.lisp" 252 | } 253 | { 254 | comment: "Empty list: '()" 255 | captures: 256 | "1": 257 | name: "punctuation.section.quoted.empty-list.common.lisp" 258 | "2": 259 | name: "meta.expression.common.lisp" 260 | "3": 261 | name: "punctuation.section.expression.begin.common.lisp" 262 | "4": 263 | name: "punctuation.section.expression.end.common.lisp" 264 | match: "(')\\s*((\\()\\s*(\\)))" 265 | name: "constant.other.empty-list.common.lisp" 266 | } 267 | { 268 | coment: "This is for quoted lists: '(foo bar baz)" 269 | begin: "('\\()" 270 | beginCaptures: 271 | "1": 272 | name: "punctuation.section.quoted.common.lisp" 273 | end: "(\\))(\\n)?" 274 | name: "constant.other.quoted-object.common.lisp" 275 | patterns: [ 276 | { 277 | include: "#quoted" 278 | } 279 | ] 280 | } 281 | ] 282 | "quote-sexp": 283 | begin: "(?<=\\()\\s*(quote)\\b\\s*" 284 | beginCaptures: 285 | "1": 286 | name: "keyword.control.quote.common.lisp" 287 | contentName: "constant.other.quote.common.lisp" 288 | end: "(?=[)])" 289 | patterns: [ 290 | { 291 | include: "#quoted" 292 | } 293 | ] 294 | quoted: 295 | patterns: [ 296 | { 297 | include: "#comment" 298 | } 299 | { 300 | include: "#string" 301 | } 302 | { 303 | include: "#constants" 304 | } 305 | { 306 | begin: "(\\()" 307 | beginCaptures: 308 | "1": 309 | name: "punctuation.section.expression.begin.common.lisp" 310 | end: "(\\))" 311 | endCaptures: 312 | "1": 313 | name: "punctuation.section.expression.end.common.lisp" 314 | name: "meta.expression.quoted.common.lisp" 315 | patterns: [ 316 | { 317 | include: "#quoted" 318 | } 319 | ] 320 | } 321 | { 322 | include: "#quote" 323 | } 324 | { 325 | include: "#illegal" 326 | } 327 | ] 328 | sexp: 329 | begin: "(\\()" 330 | beginCaptures: 331 | "1": 332 | name: "punctuation.section.expression.begin.common.lisp" 333 | end: "(\\))(\\n)?" 334 | endCaptures: 335 | "1": 336 | name: "punctuation.section.expression.end.common.lisp" 337 | "2": 338 | name: "meta.after-expression.common.lisp" # maybe not needed? 339 | name: "meta.expression.common.lisp" 340 | patterns: [ 341 | { 342 | include: "#comment" 343 | } 344 | { 345 | begin: '''(?xi) 346 | (?<=\\() 347 | (lambda)\\s+ 348 | (\\(\\s* 349 | (( 350 | [^()\\s]+[\\n\\s]*| 351 | \\([^()\\s]+\\s+[^()\\s]+\\)[\\n\\s]* 352 | )*) 353 | \\)) 354 | ''' 355 | captures: 356 | "1": 357 | name: "keyword.control.common.lisp" 358 | "3": 359 | name: "variable.parameter.common.lisp" 360 | end: "(?=\\))" 361 | name: "meta.declaration.procedure.common.lisp" 362 | patterns: [ 363 | { 364 | include: "#comment" 365 | } 366 | { 367 | include: "#constants" 368 | } 369 | { 370 | include: "#string" 371 | } 372 | { 373 | include: "#quote" 374 | } 375 | { 376 | include: "#sexp" 377 | } 378 | { 379 | include: "#illegal" 380 | } 381 | ] 382 | } 383 | { 384 | begin: '''(?xi) 385 | (?<=\\() 386 | (defstruct)\\s+ 387 | ''' 388 | captures: 389 | "1": 390 | name: "storage.type.structure.common.lisp" 391 | end: "(?=\\))" 392 | name: "meta.declaration.structure.common.lisp" 393 | patterns: [ 394 | # extend this so it's proper... 395 | { 396 | include: "#comment" 397 | } 398 | { 399 | include: "#constants" 400 | } 401 | { 402 | include: "#string" 403 | } 404 | { 405 | include: "#quote" 406 | } 407 | { 408 | include: "#sexp" 409 | } 410 | { 411 | include: "#illegal" 412 | } 413 | ] 414 | } 415 | { 416 | begin: '''(?xi) 417 | (?<=\\() 418 | (def[\\S]*)\\s+ 419 | ([\\S]*)\\s+ 420 | (\\(\\s* 421 | (( 422 | [^()\\s]+[\\n\\s]*| 423 | \\([^()\\s]+\\s+[^()\\s]+\\)[\\n\\s]* 424 | )*) 425 | \\)) 426 | ''' 427 | captures: 428 | "1": 429 | name: "keyword.control.common.lisp" 430 | "2": 431 | name: "entity.name.function.common.lisp" 432 | "4": 433 | name: "variable.parameter.common.lisp" 434 | end: "(?=\\))" 435 | name: "meta.declaration.procedure.common.lisp" 436 | patterns: [ 437 | { 438 | include: "#comment" 439 | } 440 | { 441 | include: "#constants" 442 | } 443 | { 444 | include: "#string" 445 | } 446 | { 447 | include: "#quote" 448 | } 449 | { 450 | include: "#sexp" 451 | } 452 | { 453 | include: "#illegal" 454 | } 455 | ] 456 | } 457 | { 458 | include: "#quote-sexp" 459 | } 460 | { 461 | include: "#quote" 462 | } 463 | { 464 | include: "#comment" 465 | } 466 | { 467 | include: "#language-functions" 468 | } 469 | { 470 | include: "#string" 471 | } 472 | { 473 | include: "#constants" 474 | } 475 | { 476 | include: "#sexp" 477 | } 478 | ] 479 | string: 480 | patterns: [ 481 | { 482 | match: '#\\\\(Space|Backspace|Tab|Rubout|Linefeed|Return|Page|Newline|.)(?=\\s)' 483 | name: "string.character.common.lisp" 484 | } 485 | { 486 | begin: "(\")" 487 | beginCaptures: 488 | "1": 489 | name: "punctuation.definition.string.begin.common.lisp" 490 | end: "(\")" 491 | endCaptures: 492 | "1": 493 | name: "punctuation.definition.string.end.common.lisp" 494 | name: "string.quoted.double.common.lisp" 495 | patterns: [ 496 | { 497 | match: "\\\\." 498 | name: "constant.character.escape.common.lisp" 499 | } 500 | ] 501 | } 502 | ] 503 | -------------------------------------------------------------------------------- /lisplogo_alien.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | --------------------------------------------------------------------------------