source: node_modules/refractor/lang/smalltalk.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[d24f17c]1'use strict'
2
3module.exports = smalltalk
4smalltalk.displayName = 'smalltalk'
5smalltalk.aliases = []
6function smalltalk(Prism) {
7 Prism.languages.smalltalk = {
8 comment: {
9 pattern: /"(?:""|[^"])*"/,
10 greedy: true
11 },
12 char: {
13 pattern: /\$./,
14 greedy: true
15 },
16 string: {
17 pattern: /'(?:''|[^'])*'/,
18 greedy: true
19 },
20 symbol: /#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,
21 'block-arguments': {
22 pattern: /(\[\s*):[^\[|]*\|/,
23 lookbehind: true,
24 inside: {
25 variable: /:[\da-z]+/i,
26 punctuation: /\|/
27 }
28 },
29 'temporary-variables': {
30 pattern: /\|[^|]+\|/,
31 inside: {
32 variable: /[\da-z]+/i,
33 punctuation: /\|/
34 }
35 },
36 keyword: /\b(?:new|nil|self|super)\b/,
37 boolean: /\b(?:false|true)\b/,
38 number: [
39 /\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,
40 /\b\d+(?:\.\d+)?(?:e-?\d+)?/
41 ],
42 operator: /[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,
43 punctuation: /[.;:?\[\](){}]/
44 }
45}
Note: See TracBrowser for help on using the repository browser.