3 pygments.lexers._cl_builtins |
3 pygments.lexers._cl_builtins |
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 ANSI Common Lisp builtins. |
6 ANSI Common Lisp builtins. |
7 |
7 |
8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. |
8 :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. |
9 :license: BSD, see LICENSE for details. |
9 :license: BSD, see LICENSE for details. |
10 """ |
10 """ |
11 |
11 |
12 BUILTIN_FUNCTIONS = set(( # 638 functions |
12 BUILTIN_FUNCTIONS = { # 638 functions |
13 '<', '<=', '=', '>', '>=', '-', '/', '/=', '*', '+', '1-', '1+', |
13 '<', '<=', '=', '>', '>=', '-', '/', '/=', '*', '+', '1-', '1+', |
14 'abort', 'abs', 'acons', 'acos', 'acosh', 'add-method', 'adjoin', |
14 'abort', 'abs', 'acons', 'acos', 'acosh', 'add-method', 'adjoin', |
15 'adjustable-array-p', 'adjust-array', 'allocate-instance', |
15 'adjustable-array-p', 'adjust-array', 'allocate-instance', |
16 'alpha-char-p', 'alphanumericp', 'append', 'apply', 'apropos', |
16 'alpha-char-p', 'alphanumericp', 'append', 'apply', 'apropos', |
17 'apropos-list', 'aref', 'arithmetic-error-operands', |
17 'apropos-list', 'aref', 'arithmetic-error-operands', |
155 'user-homedir-pathname', 'use-value', 'values', 'values-list', 'vector', |
155 'user-homedir-pathname', 'use-value', 'values', 'values-list', 'vector', |
156 'vectorp', 'vector-pop', 'vector-push', 'vector-push-extend', 'warn', |
156 'vectorp', 'vector-pop', 'vector-push', 'vector-push-extend', 'warn', |
157 'wild-pathname-p', 'write', 'write-byte', 'write-char', 'write-line', |
157 'wild-pathname-p', 'write', 'write-byte', 'write-char', 'write-line', |
158 'write-sequence', 'write-string', 'write-to-string', 'yes-or-no-p', |
158 'write-sequence', 'write-string', 'write-to-string', 'yes-or-no-p', |
159 'y-or-n-p', 'zerop', |
159 'y-or-n-p', 'zerop', |
160 )) |
160 } |
161 |
161 |
162 SPECIAL_FORMS = set(( |
162 SPECIAL_FORMS = { |
163 'block', 'catch', 'declare', 'eval-when', 'flet', 'function', 'go', 'if', |
163 'block', 'catch', 'declare', 'eval-when', 'flet', 'function', 'go', 'if', |
164 'labels', 'lambda', 'let', 'let*', 'load-time-value', 'locally', 'macrolet', |
164 'labels', 'lambda', 'let', 'let*', 'load-time-value', 'locally', 'macrolet', |
165 'multiple-value-call', 'multiple-value-prog1', 'progn', 'progv', 'quote', |
165 'multiple-value-call', 'multiple-value-prog1', 'progn', 'progv', 'quote', |
166 'return-from', 'setq', 'symbol-macrolet', 'tagbody', 'the', 'throw', |
166 'return-from', 'setq', 'symbol-macrolet', 'tagbody', 'the', 'throw', |
167 'unwind-protect', |
167 'unwind-protect', |
168 )) |
168 } |
169 |
169 |
170 MACROS = set(( |
170 MACROS = { |
171 'and', 'assert', 'call-method', 'case', 'ccase', 'check-type', 'cond', |
171 'and', 'assert', 'call-method', 'case', 'ccase', 'check-type', 'cond', |
172 'ctypecase', 'decf', 'declaim', 'defclass', 'defconstant', 'defgeneric', |
172 'ctypecase', 'decf', 'declaim', 'defclass', 'defconstant', 'defgeneric', |
173 'define-compiler-macro', 'define-condition', 'define-method-combination', |
173 'define-compiler-macro', 'define-condition', 'define-method-combination', |
174 'define-modify-macro', 'define-setf-expander', 'define-symbol-macro', |
174 'define-modify-macro', 'define-setf-expander', 'define-symbol-macro', |
175 'defmacro', 'defmethod', 'defpackage', 'defparameter', 'defsetf', |
175 'defmacro', 'defmethod', 'defpackage', 'defparameter', 'defsetf', |
186 'unless', 'untrace', 'when', 'with-accessors', 'with-compilation-unit', |
186 'unless', 'untrace', 'when', 'with-accessors', 'with-compilation-unit', |
187 'with-condition-restarts', 'with-hash-table-iterator', |
187 'with-condition-restarts', 'with-hash-table-iterator', |
188 'with-input-from-string', 'with-open-file', 'with-open-stream', |
188 'with-input-from-string', 'with-open-file', 'with-open-stream', |
189 'with-output-to-string', 'with-package-iterator', 'with-simple-restart', |
189 'with-output-to-string', 'with-package-iterator', 'with-simple-restart', |
190 'with-slots', 'with-standard-io-syntax', |
190 'with-slots', 'with-standard-io-syntax', |
191 )) |
191 } |
192 |
192 |
193 LAMBDA_LIST_KEYWORDS = set(( |
193 LAMBDA_LIST_KEYWORDS = { |
194 '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional', |
194 '&allow-other-keys', '&aux', '&body', '&environment', '&key', '&optional', |
195 '&rest', '&whole', |
195 '&rest', '&whole', |
196 )) |
196 } |
197 |
197 |
198 DECLARATIONS = set(( |
198 DECLARATIONS = { |
199 'dynamic-extent', 'ignore', 'optimize', 'ftype', 'inline', 'special', |
199 'dynamic-extent', 'ignore', 'optimize', 'ftype', 'inline', 'special', |
200 'ignorable', 'notinline', 'type', |
200 'ignorable', 'notinline', 'type', |
201 )) |
201 } |
202 |
202 |
203 BUILTIN_TYPES = set(( |
203 BUILTIN_TYPES = { |
204 'atom', 'boolean', 'base-char', 'base-string', 'bignum', 'bit', |
204 'atom', 'boolean', 'base-char', 'base-string', 'bignum', 'bit', |
205 'compiled-function', 'extended-char', 'fixnum', 'keyword', 'nil', |
205 'compiled-function', 'extended-char', 'fixnum', 'keyword', 'nil', |
206 'signed-byte', 'short-float', 'single-float', 'double-float', 'long-float', |
206 'signed-byte', 'short-float', 'single-float', 'double-float', 'long-float', |
207 'simple-array', 'simple-base-string', 'simple-bit-vector', 'simple-string', |
207 'simple-array', 'simple-base-string', 'simple-bit-vector', 'simple-string', |
208 'simple-vector', 'standard-char', 'unsigned-byte', |
208 'simple-vector', 'standard-char', 'unsigned-byte', |
215 'parse-error', 'package-error', 'print-not-readable', 'program-error', |
215 'parse-error', 'package-error', 'print-not-readable', 'program-error', |
216 'reader-error', 'serious-condition', 'simple-condition', 'simple-error', |
216 'reader-error', 'serious-condition', 'simple-condition', 'simple-error', |
217 'simple-type-error', 'simple-warning', 'stream-error', 'storage-condition', |
217 'simple-type-error', 'simple-warning', 'stream-error', 'storage-condition', |
218 'style-warning', 'type-error', 'unbound-variable', 'unbound-slot', |
218 'style-warning', 'type-error', 'unbound-variable', 'unbound-slot', |
219 'undefined-function', 'warning', |
219 'undefined-function', 'warning', |
220 )) |
220 } |
221 |
221 |
222 BUILTIN_CLASSES = set(( |
222 BUILTIN_CLASSES = { |
223 'array', 'broadcast-stream', 'bit-vector', 'built-in-class', 'character', |
223 'array', 'broadcast-stream', 'bit-vector', 'built-in-class', 'character', |
224 'class', 'complex', 'concatenated-stream', 'cons', 'echo-stream', |
224 'class', 'complex', 'concatenated-stream', 'cons', 'echo-stream', |
225 'file-stream', 'float', 'function', 'generic-function', 'hash-table', |
225 'file-stream', 'float', 'function', 'generic-function', 'hash-table', |
226 'integer', 'list', 'logical-pathname', 'method-combination', 'method', |
226 'integer', 'list', 'logical-pathname', 'method-combination', 'method', |
227 'null', 'number', 'package', 'pathname', 'ratio', 'rational', 'readtable', |
227 'null', 'number', 'package', 'pathname', 'ratio', 'rational', 'readtable', |
228 'real', 'random-state', 'restart', 'sequence', 'standard-class', |
228 'real', 'random-state', 'restart', 'sequence', 'standard-class', |
229 'standard-generic-function', 'standard-method', 'standard-object', |
229 'standard-generic-function', 'standard-method', 'standard-object', |
230 'string-stream', 'stream', 'string', 'structure-class', 'structure-object', |
230 'string-stream', 'stream', 'string', 'structure-class', 'structure-object', |
231 'symbol', 'synonym-stream', 't', 'two-way-stream', 'vector', |
231 'symbol', 'synonym-stream', 't', 'two-way-stream', 'vector', |
232 )) |
232 } |