MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / definition

Function definition

static/modes/asmruby-mode.ts:27–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25import * as monaco from 'monaco-editor';
26
27function definition(): monaco.languages.IMonarchLanguage {
28 return {
29 tokenizer: {
30 root: [
31 [/^(\| )*==.*$/, 'comment'],
32 [/^(\| )*catch type.*$/, 'comment'],
33 [/^(\| )*local table.*$/, 'comment'],
34 [/^(\| )*\[\s*\d+\].*$/, 'comment'],
35 [/^(\| )*\|-+$/, 'comment'],
36 [/^((?:\| )*)(\d+)/, ['comment', 'number'], '@opcode'],
37 [/^((?:\| )*)(\d+)(\s+)/, ['comment', 'number'], '@opcode'],
38 ],
39
40 opcode: [
41 [/[a-z_]\w*\s*$/, {token: 'keyword', next: '@root'}],
42 [/([a-z_]\w*)(\s+)/, 'keyword', '@arguments'],
43 ],
44
45 arguments: [
46 [/(.*?)(\(\s*\d+\)(?:\[[^\]]+\])?)$/, {token: 'comment', next: '@root'}],
47 [/.*$/, {token: '', next: '@root'}],
48 ],
49 },
50 };
51}
52
53const def = definition();
54monaco.languages.register({id: 'asmruby'});

Callers 1

asmruby-mode.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected