|
63 | 63 | (add-to-list 'auto-mode-alist '("\\.sol\\'" . solidity-mode)) |
64 | 64 |
|
65 | 65 | (defun solidity-filter (condp lst) |
| 66 | + "A simple version of a list filter. Depending on CONDP filter LST." |
66 | 67 | (delq nil |
67 | 68 | (mapcar (lambda (x) (and (funcall condp x) x)) lst))) |
68 | 69 |
|
|
242 | 243 | "uint248" |
243 | 244 | "uint256" |
244 | 245 |
|
245 | | - "msg" |
246 | | - "block" |
247 | | - "tx" |
248 | | - |
249 | 246 | "ureal") |
250 | 247 | "Built in data types of the solidity language.") |
251 | 248 |
|
| 249 | +(defconst solidity-builtin-constructs |
| 250 | + '("msg" |
| 251 | + "block" |
| 252 | + "tx") |
| 253 | + "Built in constructs of the solidity language.") |
| 254 | + |
252 | 255 | (defvar solidity-identifier-regexp |
253 | 256 | "\\([a-zA-z0-9]\\|_\\)+") |
254 | 257 |
|
|
270 | 273 | (defconst solidity-font-lock-keywords |
271 | 274 | (list |
272 | 275 | `(,(regexp-opt solidity-tofontify-keywords 'words) . font-lock-keyword-face) |
| 276 | + `(,(regexp-opt solidity-builtin-types 'words) . font-lock-type-face) |
| 277 | + `(,(regexp-opt solidity-builtin-constructs 'words) . font-lock-builtin-face) |
273 | 278 | '(solidity-match-functions (1 font-lock-type-face) |
274 | 279 | (2 font-lock-function-name-face)) |
275 | 280 | '(solidity-match-mappings (1 font-lock-type-face) |
|
288 | 293 | (2 font-lock-variable-name-face)) |
289 | 294 | '(solidity-match-variable-decls (1 font-lock-keyword-face) |
290 | 295 | (2 font-lock-variable-name-face)) |
291 | | - `(,(regexp-opt solidity-constants 'words) . font-lock-constant-face) |
292 | | - `(,(regexp-opt solidity-builtin-types 'words) . font-lock-builtin-face)) |
| 296 | + `(,(regexp-opt solidity-constants 'words) . font-lock-constant-face)) |
293 | 297 | "The font lock options for solidity.") |
294 | 298 |
|
295 | 299 | (defun solidity-match-regexp (re limit) |
|
0 commit comments