30 filenames = ['*.dylan', '*.dyl', '*.intr'] |
30 filenames = ['*.dylan', '*.dyl', '*.intr'] |
31 mimetypes = ['text/x-dylan'] |
31 mimetypes = ['text/x-dylan'] |
32 |
32 |
33 flags = re.IGNORECASE |
33 flags = re.IGNORECASE |
34 |
34 |
35 builtins = set(( |
35 builtins = { |
36 'subclass', 'abstract', 'block', 'concrete', 'constant', 'class', |
36 'subclass', 'abstract', 'block', 'concrete', 'constant', 'class', |
37 'compiler-open', 'compiler-sideways', 'domain', 'dynamic', |
37 'compiler-open', 'compiler-sideways', 'domain', 'dynamic', |
38 'each-subclass', 'exception', 'exclude', 'function', 'generic', |
38 'each-subclass', 'exception', 'exclude', 'function', 'generic', |
39 'handler', 'inherited', 'inline', 'inline-only', 'instance', |
39 'handler', 'inherited', 'inline', 'inline-only', 'instance', |
40 'interface', 'import', 'keyword', 'library', 'macro', 'method', |
40 'interface', 'import', 'keyword', 'library', 'macro', 'method', |
41 'module', 'open', 'primary', 'required', 'sealed', 'sideways', |
41 'module', 'open', 'primary', 'required', 'sealed', 'sideways', |
42 'singleton', 'slot', 'thread', 'variable', 'virtual')) |
42 'singleton', 'slot', 'thread', 'variable', 'virtual'} |
43 |
43 |
44 keywords = set(( |
44 keywords = { |
45 'above', 'afterwards', 'begin', 'below', 'by', 'case', 'cleanup', |
45 'above', 'afterwards', 'begin', 'below', 'by', 'case', 'cleanup', |
46 'create', 'define', 'else', 'elseif', 'end', 'export', 'finally', |
46 'create', 'define', 'else', 'elseif', 'end', 'export', 'finally', |
47 'for', 'from', 'if', 'in', 'let', 'local', 'otherwise', 'rename', |
47 'for', 'from', 'if', 'in', 'let', 'local', 'otherwise', 'rename', |
48 'select', 'signal', 'then', 'to', 'unless', 'until', 'use', 'when', |
48 'select', 'signal', 'then', 'to', 'unless', 'until', 'use', 'when', |
49 'while')) |
49 'while'} |
50 |
50 |
51 operators = set(( |
51 operators = { |
52 '~', '+', '-', '*', '|', '^', '=', '==', '~=', '~==', '<', '<=', |
52 '~', '+', '-', '*', '|', '^', '=', '==', '~=', '~==', '<', '<=', |
53 '>', '>=', '&', '|')) |
53 '>', '>=', '&', '|'} |
54 |
54 |
55 functions = set(( |
55 functions = { |
56 'abort', 'abs', 'add', 'add!', 'add-method', 'add-new', 'add-new!', |
56 'abort', 'abs', 'add', 'add!', 'add-method', 'add-new', 'add-new!', |
57 'all-superclasses', 'always', 'any?', 'applicable-method?', 'apply', |
57 'all-superclasses', 'always', 'any?', 'applicable-method?', 'apply', |
58 'aref', 'aref-setter', 'as', 'as-lowercase', 'as-lowercase!', |
58 'aref', 'aref-setter', 'as', 'as-lowercase', 'as-lowercase!', |
59 'as-uppercase', 'as-uppercase!', 'ash', 'backward-iteration-protocol', |
59 'as-uppercase', 'as-uppercase!', 'ash', 'backward-iteration-protocol', |
60 'break', 'ceiling', 'ceiling/', 'cerror', 'check-type', 'choose', |
60 'break', 'ceiling', 'ceiling/', 'cerror', 'check-type', 'choose', |
84 'signal', 'singleton', 'size', 'size-setter', 'slot-initialized?', |
84 'signal', 'singleton', 'size', 'size-setter', 'slot-initialized?', |
85 'sort', 'sort!', 'sorted-applicable-methods', 'subsequence-position', |
85 'sort', 'sort!', 'sorted-applicable-methods', 'subsequence-position', |
86 'subtype?', 'table-protocol', 'tail', 'tail-setter', 'third', |
86 'subtype?', 'table-protocol', 'tail', 'tail-setter', 'third', |
87 'third-setter', 'truncate', 'truncate/', 'type-error-expected-type', |
87 'third-setter', 'truncate', 'truncate/', 'type-error-expected-type', |
88 'type-error-value', 'type-for-copy', 'type-union', 'union', 'values', |
88 'type-error-value', 'type-for-copy', 'type-union', 'union', 'values', |
89 'vector', 'zero?')) |
89 'vector', 'zero?'} |
90 |
90 |
91 valid_name = '\\\\?[\\w!&*<>|^$%@\\-+~?/=]+' |
91 valid_name = '\\\\?[\\w!&*<>|^$%@\\-+~?/=]+' |
92 |
92 |
93 def get_tokens_unprocessed(self, text): |
93 def get_tokens_unprocessed(self, text): |
94 for index, token, value in RegexLexer.get_tokens_unprocessed(self, text): |
94 for index, token, value in RegexLexer.get_tokens_unprocessed(self, text): |