@plurnk/plurnk-mimetypes-text-csharp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/TextCsharp.d.ts +7 -0
- package/dist/TextCsharp.d.ts.map +1 -0
- package/dist/TextCsharp.js +279 -0
- package/dist/TextCsharp.js.map +1 -0
- package/dist/generated/CSharpLexer.d.ts +241 -0
- package/dist/generated/CSharpLexer.d.ts.map +1 -0
- package/dist/generated/CSharpLexer.js +1368 -0
- package/dist/generated/CSharpLexer.js.map +1 -0
- package/dist/generated/CSharpLexerBase.d.ts +46 -0
- package/dist/generated/CSharpLexerBase.d.ts.map +1 -0
- package/dist/generated/CSharpLexerBase.js +342 -0
- package/dist/generated/CSharpLexerBase.js.map +1 -0
- package/dist/generated/CSharpParser.d.ts +3242 -0
- package/dist/generated/CSharpParser.d.ts.map +1 -0
- package/dist/generated/CSharpParser.js +22715 -0
- package/dist/generated/CSharpParser.js.map +1 -0
- package/dist/generated/CSharpParserBase.d.ts +11 -0
- package/dist/generated/CSharpParserBase.d.ts.map +1 -0
- package/dist/generated/CSharpParserBase.js +49 -0
- package/dist/generated/CSharpParserBase.js.map +1 -0
- package/dist/generated/CSharpParserVisitor.d.ts +1838 -0
- package/dist/generated/CSharpParserVisitor.d.ts.map +1 -0
- package/dist/generated/CSharpParserVisitor.js +1583 -0
- package/dist/generated/CSharpParserVisitor.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/grammar/CSharpLexer.g4 +1066 -0
- package/grammar/CSharpParser.g4 +1315 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PossumTech Laboratories
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @plurnk/plurnk-mimetypes-text-csharp
|
|
2
|
+
|
|
3
|
+
text/x-csharp mimetype handler for plurnk-service. ANTLR-backed extraction using grammars-v4's `csharp/v7` grammar.
|
|
4
|
+
|
|
5
|
+
## Symbols emitted
|
|
6
|
+
|
|
7
|
+
Per SPEC §3 inclusion policy: classes, functions, methods, fields, interfaces, enums, types, modules, variables, constants. Imports excluded; locals inside function bodies excluded.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @plurnk/plurnk-mimetypes-text-csharp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Auto-discovered by `@plurnk/plurnk-mimetypes` when installed alongside it.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AntlrExtractor } from "@plurnk/plurnk-mimetypes";
|
|
2
|
+
import type { ExtractionVisitor } from "@plurnk/plurnk-mimetypes";
|
|
3
|
+
export default class TextCsharp extends AntlrExtractor {
|
|
4
|
+
protected parseTree(content: string): unknown;
|
|
5
|
+
protected createVisitor(): ExtractionVisitor;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=TextCsharp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextCsharp.d.ts","sourceRoot":"","sources":["../src/TextCsharp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAelE,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,cAAc;IAClD,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAQ7C,SAAS,CAAC,aAAa,IAAI,iBAAiB;CAG/C"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { AntlrExtractor, withExtractor } from "@plurnk/plurnk-mimetypes";
|
|
2
|
+
import { CharStream, CommonTokenStream } from "antlr4ng";
|
|
3
|
+
import { CSharpLexer } from "./generated/CSharpLexer.js";
|
|
4
|
+
import { CSharpParser } from "./generated/CSharpParser.js";
|
|
5
|
+
import { CSharpParserVisitor } from "./generated/CSharpParserVisitor.js";
|
|
6
|
+
// text/x-csharp handler. ANTLR grammar from grammars-v4/csharp/v7.
|
|
7
|
+
//
|
|
8
|
+
// Parser entry rule: compilation_unit
|
|
9
|
+
// compilation_unit:
|
|
10
|
+
// BOM? extern_aliases? using_directives? global_attribute_section*
|
|
11
|
+
// namespace_member_declarations? EOF
|
|
12
|
+
//
|
|
13
|
+
// Note: the grammar uses snake_case rule names (atypical for C# but standard
|
|
14
|
+
// in this grammar), so visitor handlers are named visit<Snake_case>.
|
|
15
|
+
export default class TextCsharp extends AntlrExtractor {
|
|
16
|
+
parseTree(content) {
|
|
17
|
+
const lexer = new CSharpLexer(CharStream.fromString(content));
|
|
18
|
+
const tokens = new CommonTokenStream(lexer);
|
|
19
|
+
const parser = new CSharpParser(tokens);
|
|
20
|
+
parser.removeErrorListeners();
|
|
21
|
+
return parser.compilation_unit();
|
|
22
|
+
}
|
|
23
|
+
createVisitor() {
|
|
24
|
+
return new TextCsharpVisitor();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// SPEC §3 mapping for C#:
|
|
28
|
+
// namespace_declaration → module
|
|
29
|
+
// class_definition → class
|
|
30
|
+
// struct_definition → class (value-type "class" semantically)
|
|
31
|
+
// interface_definition → interface
|
|
32
|
+
// enum_definition → enum
|
|
33
|
+
// delegate_definition → function (a delegate is a typed function sig)
|
|
34
|
+
// method_declaration → method
|
|
35
|
+
// constructor_declaration → method
|
|
36
|
+
// destructor_definition → method
|
|
37
|
+
// property_declaration → field
|
|
38
|
+
// event_declaration → field
|
|
39
|
+
// field_declaration → field (variable_declarators inside)
|
|
40
|
+
// constant_declaration → constant
|
|
41
|
+
// using_directive → excluded
|
|
42
|
+
// local_variable_declaration → excluded (gateBody)
|
|
43
|
+
class TextCsharpVisitor extends withExtractor(CSharpParserVisitor) {
|
|
44
|
+
visitNamespace_declaration = (ctx) => {
|
|
45
|
+
if (this.inBody)
|
|
46
|
+
return null;
|
|
47
|
+
const qi = ctx.qualified_identifier?.();
|
|
48
|
+
const name = qi?.getText?.();
|
|
49
|
+
if (name)
|
|
50
|
+
this.addSymbol("module", name, ctx);
|
|
51
|
+
this.visitChildren(ctx);
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
visitClass_definition = (ctx) => {
|
|
55
|
+
if (this.inBody)
|
|
56
|
+
return null;
|
|
57
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
58
|
+
if (id)
|
|
59
|
+
this.addSymbol("class", id, ctx);
|
|
60
|
+
this.visitChildren(ctx);
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
63
|
+
visitStruct_definition = (ctx) => {
|
|
64
|
+
if (this.inBody)
|
|
65
|
+
return null;
|
|
66
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
67
|
+
if (id)
|
|
68
|
+
this.addSymbol("class", id, ctx);
|
|
69
|
+
this.visitChildren(ctx);
|
|
70
|
+
return null;
|
|
71
|
+
};
|
|
72
|
+
visitInterface_definition = (ctx) => {
|
|
73
|
+
if (this.inBody)
|
|
74
|
+
return null;
|
|
75
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
76
|
+
if (id)
|
|
77
|
+
this.addSymbol("interface", id, ctx);
|
|
78
|
+
this.visitChildren(ctx);
|
|
79
|
+
return null;
|
|
80
|
+
};
|
|
81
|
+
visitEnum_definition = (ctx) => {
|
|
82
|
+
if (this.inBody)
|
|
83
|
+
return null;
|
|
84
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
85
|
+
if (id)
|
|
86
|
+
this.addSymbol("enum", id, ctx);
|
|
87
|
+
// Don't recurse: enum members aren't symbols we surface per SPEC §3.
|
|
88
|
+
return null;
|
|
89
|
+
};
|
|
90
|
+
visitDelegate_definition = (ctx) => {
|
|
91
|
+
if (this.inBody)
|
|
92
|
+
return null;
|
|
93
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
94
|
+
if (!id)
|
|
95
|
+
return null;
|
|
96
|
+
const params = extractCsharpParams(ctx.formal_parameter_list?.());
|
|
97
|
+
this.addSymbol("function", id, ctx, params);
|
|
98
|
+
return null;
|
|
99
|
+
};
|
|
100
|
+
visitMethod_declaration = (ctx) => {
|
|
101
|
+
if (this.inBody)
|
|
102
|
+
return null;
|
|
103
|
+
const mmn = ctx.method_member_name?.();
|
|
104
|
+
const name = lastIdentifierText(mmn);
|
|
105
|
+
if (!name)
|
|
106
|
+
return null;
|
|
107
|
+
const params = extractCsharpParams(ctx.formal_parameter_list?.());
|
|
108
|
+
this.addSymbol("method", name, ctx, params);
|
|
109
|
+
const body = ctx.method_body?.();
|
|
110
|
+
if (body)
|
|
111
|
+
this.gateBody(body);
|
|
112
|
+
return null;
|
|
113
|
+
};
|
|
114
|
+
visitConstructor_declaration = (ctx) => {
|
|
115
|
+
if (this.inBody)
|
|
116
|
+
return null;
|
|
117
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
118
|
+
if (!id)
|
|
119
|
+
return null;
|
|
120
|
+
const params = extractCsharpParams(ctx.formal_parameter_list?.());
|
|
121
|
+
this.addSymbol("method", id, ctx, params);
|
|
122
|
+
const body = ctx.body?.();
|
|
123
|
+
if (body)
|
|
124
|
+
this.gateBody(body);
|
|
125
|
+
return null;
|
|
126
|
+
};
|
|
127
|
+
visitDestructor_definition = (ctx) => {
|
|
128
|
+
if (this.inBody)
|
|
129
|
+
return null;
|
|
130
|
+
const id = ctx.identifier?.()?.getText?.();
|
|
131
|
+
if (!id)
|
|
132
|
+
return null;
|
|
133
|
+
this.addSymbol("method", `~${id}`, ctx);
|
|
134
|
+
const body = ctx.body?.();
|
|
135
|
+
if (body)
|
|
136
|
+
this.gateBody(body);
|
|
137
|
+
return null;
|
|
138
|
+
};
|
|
139
|
+
visitProperty_declaration = (ctx) => {
|
|
140
|
+
if (this.inBody)
|
|
141
|
+
return null;
|
|
142
|
+
const mn = ctx.member_name?.();
|
|
143
|
+
const name = mn?.getText?.();
|
|
144
|
+
if (name)
|
|
145
|
+
this.addSymbol("field", name, ctx);
|
|
146
|
+
return null;
|
|
147
|
+
};
|
|
148
|
+
visitEvent_declaration = (ctx) => {
|
|
149
|
+
if (this.inBody)
|
|
150
|
+
return null;
|
|
151
|
+
const vds = ctx.variable_declarators?.();
|
|
152
|
+
if (vds) {
|
|
153
|
+
for (const name of variableDeclaratorNames(vds)) {
|
|
154
|
+
this.addSymbol("field", name, ctx);
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const mn = ctx.member_name?.();
|
|
159
|
+
const name = mn?.getText?.();
|
|
160
|
+
if (name)
|
|
161
|
+
this.addSymbol("field", name, ctx);
|
|
162
|
+
return null;
|
|
163
|
+
};
|
|
164
|
+
visitField_declaration = (ctx) => {
|
|
165
|
+
if (this.inBody)
|
|
166
|
+
return null;
|
|
167
|
+
const vds = ctx.variable_declarators?.();
|
|
168
|
+
if (!vds)
|
|
169
|
+
return null;
|
|
170
|
+
for (const name of variableDeclaratorNames(vds)) {
|
|
171
|
+
this.addSymbol("field", name, ctx);
|
|
172
|
+
}
|
|
173
|
+
return null;
|
|
174
|
+
};
|
|
175
|
+
visitConstant_declaration = (ctx) => {
|
|
176
|
+
if (this.inBody)
|
|
177
|
+
return null;
|
|
178
|
+
const cds = ctx.constant_declarators?.();
|
|
179
|
+
if (!cds)
|
|
180
|
+
return null;
|
|
181
|
+
for (const name of constantDeclaratorNames(cds)) {
|
|
182
|
+
this.addSymbol("constant", name, ctx);
|
|
183
|
+
}
|
|
184
|
+
return null;
|
|
185
|
+
};
|
|
186
|
+
visitUsing_directive = (_ctx) => {
|
|
187
|
+
return null;
|
|
188
|
+
};
|
|
189
|
+
visitInterface_member_declaration = (ctx) => {
|
|
190
|
+
if (this.inBody)
|
|
191
|
+
return null;
|
|
192
|
+
// The grammar inlines methods, properties, events, indexers directly
|
|
193
|
+
// into interface_member_declaration rather than re-using the named
|
|
194
|
+
// rules. Use the presence of `(` to discriminate method vs property.
|
|
195
|
+
const id = ctx.identifier?.();
|
|
196
|
+
if (!id)
|
|
197
|
+
return null;
|
|
198
|
+
const idText = id.getText();
|
|
199
|
+
const hasParens = !!ctx.OPEN_PARENS?.();
|
|
200
|
+
if (hasParens) {
|
|
201
|
+
const params = extractCsharpParams(ctx.formal_parameter_list?.());
|
|
202
|
+
this.addSymbol("method", idText, ctx, params);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.addSymbol("field", idText, ctx);
|
|
206
|
+
}
|
|
207
|
+
return null;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
// method_member_name: identifier ('.' identifier)* — last segment is the
|
|
211
|
+
// method's local name. Explicit interface implementations like `IFoo.Bar`
|
|
212
|
+
// surface as `Bar` since the surrounding type structure already places them.
|
|
213
|
+
function lastIdentifierText(mmn) {
|
|
214
|
+
if (!mmn)
|
|
215
|
+
return null;
|
|
216
|
+
const node = mmn;
|
|
217
|
+
const raw = node.identifier?.();
|
|
218
|
+
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
219
|
+
if (arr.length === 0)
|
|
220
|
+
return null;
|
|
221
|
+
const last = arr[arr.length - 1];
|
|
222
|
+
return last?.getText?.() ?? null;
|
|
223
|
+
}
|
|
224
|
+
function variableDeclaratorNames(vds) {
|
|
225
|
+
const node = vds;
|
|
226
|
+
const raw = node.variable_declarator?.();
|
|
227
|
+
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
228
|
+
const out = [];
|
|
229
|
+
for (const vd of arr) {
|
|
230
|
+
const t = vd.identifier?.()?.getText?.();
|
|
231
|
+
if (t)
|
|
232
|
+
out.push(t);
|
|
233
|
+
}
|
|
234
|
+
return out;
|
|
235
|
+
}
|
|
236
|
+
function constantDeclaratorNames(cds) {
|
|
237
|
+
const node = cds;
|
|
238
|
+
const raw = node.constant_declarator?.();
|
|
239
|
+
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
240
|
+
const out = [];
|
|
241
|
+
for (const cd of arr) {
|
|
242
|
+
const t = cd.identifier?.()?.getText?.();
|
|
243
|
+
if (t)
|
|
244
|
+
out.push(t);
|
|
245
|
+
}
|
|
246
|
+
return out;
|
|
247
|
+
}
|
|
248
|
+
// formal_parameter_list: parameter_array | fixed_parameters (',' parameter_array)?
|
|
249
|
+
// fixed_parameters: fixed_parameter (',' fixed_parameter)*
|
|
250
|
+
// fixed_parameter: attributes? parameter_modifier? arg_declaration | ARGLIST
|
|
251
|
+
// arg_declaration: type_ identifier ('=' expression)?
|
|
252
|
+
// parameter_array: attributes? PARAMS array_type identifier
|
|
253
|
+
function extractCsharpParams(formalList) {
|
|
254
|
+
if (!formalList)
|
|
255
|
+
return [];
|
|
256
|
+
const node = formalList;
|
|
257
|
+
const out = [];
|
|
258
|
+
const fixed = node.fixed_parameters?.();
|
|
259
|
+
if (fixed) {
|
|
260
|
+
const fp = fixed;
|
|
261
|
+
const raw = fp.fixed_parameter?.();
|
|
262
|
+
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
263
|
+
for (const p of arr) {
|
|
264
|
+
const pNode = p;
|
|
265
|
+
const id = pNode.arg_declaration?.()?.identifier?.()?.getText?.();
|
|
266
|
+
if (id)
|
|
267
|
+
out.push(id);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const pa = node.parameter_array?.();
|
|
271
|
+
if (pa) {
|
|
272
|
+
const id = pa
|
|
273
|
+
.identifier?.()?.getText?.();
|
|
274
|
+
if (id)
|
|
275
|
+
out.push(id);
|
|
276
|
+
}
|
|
277
|
+
return out;
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=TextCsharp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextCsharp.js","sourceRoot":"","sources":["../src/TextCsharp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,mEAAmE;AACnE,EAAE;AACF,sCAAsC;AACtC,sBAAsB;AACtB,uEAAuE;AACvE,yCAAyC;AACzC,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AACrE,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,cA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AE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;YAClE,IAAI,EAAE;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC;IACL,CAAC;IACD,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;IACpC,IAAI,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,GAAI,EAA+D;aACtE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;QACjC,IAAI,EAAE;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import * as antlr from "antlr4ng";
|
|
2
|
+
import CSharpLexerBase from "./CSharpLexerBase.ts";
|
|
3
|
+
export declare class CSharpLexer extends CSharpLexerBase {
|
|
4
|
+
static readonly BYTE_ORDER_MARK = 1;
|
|
5
|
+
static readonly SINGLE_LINE_DOC_COMMENT = 2;
|
|
6
|
+
static readonly EMPTY_DELIMITED_DOC_COMMENT = 3;
|
|
7
|
+
static readonly DELIMITED_DOC_COMMENT = 4;
|
|
8
|
+
static readonly SINGLE_LINE_COMMENT = 5;
|
|
9
|
+
static readonly DELIMITED_COMMENT = 6;
|
|
10
|
+
static readonly WHITESPACES = 7;
|
|
11
|
+
static readonly SHARP = 8;
|
|
12
|
+
static readonly ABSTRACT = 9;
|
|
13
|
+
static readonly ADD = 10;
|
|
14
|
+
static readonly ALIAS = 11;
|
|
15
|
+
static readonly ARGLIST = 12;
|
|
16
|
+
static readonly AS = 13;
|
|
17
|
+
static readonly ASCENDING = 14;
|
|
18
|
+
static readonly ASYNC = 15;
|
|
19
|
+
static readonly AWAIT = 16;
|
|
20
|
+
static readonly BASE = 17;
|
|
21
|
+
static readonly BOOL = 18;
|
|
22
|
+
static readonly BREAK = 19;
|
|
23
|
+
static readonly BY = 20;
|
|
24
|
+
static readonly BYTE = 21;
|
|
25
|
+
static readonly CASE = 22;
|
|
26
|
+
static readonly CATCH = 23;
|
|
27
|
+
static readonly CHAR = 24;
|
|
28
|
+
static readonly CHECKED = 25;
|
|
29
|
+
static readonly CLASS = 26;
|
|
30
|
+
static readonly CONST = 27;
|
|
31
|
+
static readonly CONTINUE = 28;
|
|
32
|
+
static readonly DECIMAL = 29;
|
|
33
|
+
static readonly DEFAULT = 30;
|
|
34
|
+
static readonly DELEGATE = 31;
|
|
35
|
+
static readonly DESCENDING = 32;
|
|
36
|
+
static readonly DO = 33;
|
|
37
|
+
static readonly DOUBLE = 34;
|
|
38
|
+
static readonly DYNAMIC = 35;
|
|
39
|
+
static readonly ELSE = 36;
|
|
40
|
+
static readonly ENUM = 37;
|
|
41
|
+
static readonly EQUALS = 38;
|
|
42
|
+
static readonly EVENT = 39;
|
|
43
|
+
static readonly EXPLICIT = 40;
|
|
44
|
+
static readonly EXTERN = 41;
|
|
45
|
+
static readonly FALSE = 42;
|
|
46
|
+
static readonly FINALLY = 43;
|
|
47
|
+
static readonly FIXED = 44;
|
|
48
|
+
static readonly FLOAT = 45;
|
|
49
|
+
static readonly FOR = 46;
|
|
50
|
+
static readonly FOREACH = 47;
|
|
51
|
+
static readonly FROM = 48;
|
|
52
|
+
static readonly GET = 49;
|
|
53
|
+
static readonly GOTO = 50;
|
|
54
|
+
static readonly GROUP = 51;
|
|
55
|
+
static readonly IF = 52;
|
|
56
|
+
static readonly IMPLICIT = 53;
|
|
57
|
+
static readonly IN = 54;
|
|
58
|
+
static readonly INT = 55;
|
|
59
|
+
static readonly INTERFACE = 56;
|
|
60
|
+
static readonly INTERNAL = 57;
|
|
61
|
+
static readonly INTO = 58;
|
|
62
|
+
static readonly IS = 59;
|
|
63
|
+
static readonly JOIN = 60;
|
|
64
|
+
static readonly LET = 61;
|
|
65
|
+
static readonly LOCK = 62;
|
|
66
|
+
static readonly LONG = 63;
|
|
67
|
+
static readonly NAMEOF = 64;
|
|
68
|
+
static readonly NAMESPACE = 65;
|
|
69
|
+
static readonly NEW = 66;
|
|
70
|
+
static readonly NULL_ = 67;
|
|
71
|
+
static readonly OBJECT = 68;
|
|
72
|
+
static readonly ON = 69;
|
|
73
|
+
static readonly OPERATOR = 70;
|
|
74
|
+
static readonly ORDERBY = 71;
|
|
75
|
+
static readonly OUT = 72;
|
|
76
|
+
static readonly OVERRIDE = 73;
|
|
77
|
+
static readonly PARAMS = 74;
|
|
78
|
+
static readonly PARTIAL = 75;
|
|
79
|
+
static readonly PRIVATE = 76;
|
|
80
|
+
static readonly PROTECTED = 77;
|
|
81
|
+
static readonly PUBLIC = 78;
|
|
82
|
+
static readonly READONLY = 79;
|
|
83
|
+
static readonly REF = 80;
|
|
84
|
+
static readonly REMOVE = 81;
|
|
85
|
+
static readonly RETURN = 82;
|
|
86
|
+
static readonly SBYTE = 83;
|
|
87
|
+
static readonly SEALED = 84;
|
|
88
|
+
static readonly SELECT = 85;
|
|
89
|
+
static readonly SET = 86;
|
|
90
|
+
static readonly SHORT = 87;
|
|
91
|
+
static readonly SIZEOF = 88;
|
|
92
|
+
static readonly STACKALLOC = 89;
|
|
93
|
+
static readonly STATIC = 90;
|
|
94
|
+
static readonly STRING = 91;
|
|
95
|
+
static readonly STRUCT = 92;
|
|
96
|
+
static readonly SWITCH = 93;
|
|
97
|
+
static readonly THIS = 94;
|
|
98
|
+
static readonly THROW = 95;
|
|
99
|
+
static readonly TRUE = 96;
|
|
100
|
+
static readonly TRY = 97;
|
|
101
|
+
static readonly TYPEOF = 98;
|
|
102
|
+
static readonly UINT = 99;
|
|
103
|
+
static readonly ULONG = 100;
|
|
104
|
+
static readonly UNCHECKED = 101;
|
|
105
|
+
static readonly UNMANAGED = 102;
|
|
106
|
+
static readonly UNSAFE = 103;
|
|
107
|
+
static readonly USHORT = 104;
|
|
108
|
+
static readonly USING = 105;
|
|
109
|
+
static readonly VAR = 106;
|
|
110
|
+
static readonly VIRTUAL = 107;
|
|
111
|
+
static readonly VOID = 108;
|
|
112
|
+
static readonly VOLATILE = 109;
|
|
113
|
+
static readonly WHEN = 110;
|
|
114
|
+
static readonly WHERE = 111;
|
|
115
|
+
static readonly WHILE = 112;
|
|
116
|
+
static readonly YIELD = 113;
|
|
117
|
+
static readonly IDENTIFIER = 114;
|
|
118
|
+
static readonly LITERAL_ACCESS = 115;
|
|
119
|
+
static readonly INTEGER_LITERAL = 116;
|
|
120
|
+
static readonly HEX_INTEGER_LITERAL = 117;
|
|
121
|
+
static readonly BIN_INTEGER_LITERAL = 118;
|
|
122
|
+
static readonly REAL_LITERAL = 119;
|
|
123
|
+
static readonly CHARACTER_LITERAL = 120;
|
|
124
|
+
static readonly REGULAR_STRING = 121;
|
|
125
|
+
static readonly VERBATIUM_STRING = 122;
|
|
126
|
+
static readonly INTERPOLATED_REGULAR_STRING_START = 123;
|
|
127
|
+
static readonly INTERPOLATED_VERBATIUM_STRING_START = 124;
|
|
128
|
+
static readonly OPEN_BRACE = 125;
|
|
129
|
+
static readonly CLOSE_BRACE = 126;
|
|
130
|
+
static readonly OPEN_BRACKET = 127;
|
|
131
|
+
static readonly CLOSE_BRACKET = 128;
|
|
132
|
+
static readonly OPEN_PARENS = 129;
|
|
133
|
+
static readonly CLOSE_PARENS = 130;
|
|
134
|
+
static readonly DOT = 131;
|
|
135
|
+
static readonly COMMA = 132;
|
|
136
|
+
static readonly COLON = 133;
|
|
137
|
+
static readonly SEMICOLON = 134;
|
|
138
|
+
static readonly PLUS = 135;
|
|
139
|
+
static readonly MINUS = 136;
|
|
140
|
+
static readonly STAR = 137;
|
|
141
|
+
static readonly DIV = 138;
|
|
142
|
+
static readonly PERCENT = 139;
|
|
143
|
+
static readonly AMP = 140;
|
|
144
|
+
static readonly BITWISE_OR = 141;
|
|
145
|
+
static readonly CARET = 142;
|
|
146
|
+
static readonly BANG = 143;
|
|
147
|
+
static readonly TILDE = 144;
|
|
148
|
+
static readonly ASSIGNMENT = 145;
|
|
149
|
+
static readonly LT = 146;
|
|
150
|
+
static readonly GT = 147;
|
|
151
|
+
static readonly INTERR = 148;
|
|
152
|
+
static readonly DOUBLE_COLON = 149;
|
|
153
|
+
static readonly OP_COALESCING = 150;
|
|
154
|
+
static readonly OP_INC = 151;
|
|
155
|
+
static readonly OP_DEC = 152;
|
|
156
|
+
static readonly OP_AND = 153;
|
|
157
|
+
static readonly OP_OR = 154;
|
|
158
|
+
static readonly OP_PTR = 155;
|
|
159
|
+
static readonly OP_EQ = 156;
|
|
160
|
+
static readonly OP_NE = 157;
|
|
161
|
+
static readonly OP_LE = 158;
|
|
162
|
+
static readonly OP_GE = 159;
|
|
163
|
+
static readonly OP_ADD_ASSIGNMENT = 160;
|
|
164
|
+
static readonly OP_SUB_ASSIGNMENT = 161;
|
|
165
|
+
static readonly OP_MULT_ASSIGNMENT = 162;
|
|
166
|
+
static readonly OP_DIV_ASSIGNMENT = 163;
|
|
167
|
+
static readonly OP_MOD_ASSIGNMENT = 164;
|
|
168
|
+
static readonly OP_AND_ASSIGNMENT = 165;
|
|
169
|
+
static readonly OP_OR_ASSIGNMENT = 166;
|
|
170
|
+
static readonly OP_XOR_ASSIGNMENT = 167;
|
|
171
|
+
static readonly OP_LEFT_SHIFT = 168;
|
|
172
|
+
static readonly OP_LEFT_SHIFT_ASSIGNMENT = 169;
|
|
173
|
+
static readonly OP_COALESCING_ASSIGNMENT = 170;
|
|
174
|
+
static readonly OP_RANGE = 171;
|
|
175
|
+
static readonly SKIPPED_SECTION = 172;
|
|
176
|
+
static readonly DOUBLE_CURLY_INSIDE = 173;
|
|
177
|
+
static readonly OPEN_BRACE_INSIDE = 174;
|
|
178
|
+
static readonly REGULAR_CHAR_INSIDE = 175;
|
|
179
|
+
static readonly VERBATIUM_DOUBLE_QUOTE_INSIDE = 176;
|
|
180
|
+
static readonly DOUBLE_QUOTE_INSIDE = 177;
|
|
181
|
+
static readonly REGULAR_STRING_INSIDE = 178;
|
|
182
|
+
static readonly VERBATIUM_INSIDE_STRING = 179;
|
|
183
|
+
static readonly CLOSE_BRACE_INSIDE = 180;
|
|
184
|
+
static readonly FORMAT_STRING = 181;
|
|
185
|
+
static readonly DIRECTIVE_WHITESPACES = 182;
|
|
186
|
+
static readonly DIGITS = 183;
|
|
187
|
+
static readonly DEFINE = 184;
|
|
188
|
+
static readonly UNDEF = 185;
|
|
189
|
+
static readonly ELIF = 186;
|
|
190
|
+
static readonly ENDIF = 187;
|
|
191
|
+
static readonly LINE = 188;
|
|
192
|
+
static readonly ERROR = 189;
|
|
193
|
+
static readonly WARNING = 190;
|
|
194
|
+
static readonly REGION = 191;
|
|
195
|
+
static readonly ENDREGION = 192;
|
|
196
|
+
static readonly PRAGMA = 193;
|
|
197
|
+
static readonly NULLABLE = 194;
|
|
198
|
+
static readonly DIRECTIVE_HIDDEN = 195;
|
|
199
|
+
static readonly CONDITIONAL_SYMBOL = 196;
|
|
200
|
+
static readonly DIRECTIVE_NEW_LINE = 197;
|
|
201
|
+
static readonly TEXT = 198;
|
|
202
|
+
static readonly DOUBLE_CURLY_CLOSE_INSIDE = 199;
|
|
203
|
+
static readonly INTERPOLATION_STRING = 1;
|
|
204
|
+
static readonly INTERPOLATION_FORMAT = 2;
|
|
205
|
+
static readonly DIRECTIVE_MODE = 3;
|
|
206
|
+
static readonly DIRECTIVE_TEXT = 4;
|
|
207
|
+
static readonly channelNames: string[];
|
|
208
|
+
static readonly literalNames: (string | null)[];
|
|
209
|
+
static readonly symbolicNames: (string | null)[];
|
|
210
|
+
static readonly modeNames: string[];
|
|
211
|
+
static readonly ruleNames: string[];
|
|
212
|
+
constructor(input: antlr.CharStream);
|
|
213
|
+
get grammarFileName(): string;
|
|
214
|
+
get literalNames(): (string | null)[];
|
|
215
|
+
get symbolicNames(): (string | null)[];
|
|
216
|
+
get ruleNames(): string[];
|
|
217
|
+
get serializedATN(): number[];
|
|
218
|
+
get channelNames(): string[];
|
|
219
|
+
get modeNames(): string[];
|
|
220
|
+
action(localContext: antlr.ParserRuleContext | null, ruleIndex: number, actionIndex: number): void;
|
|
221
|
+
private INTERPOLATED_REGULAR_STRING_START_action;
|
|
222
|
+
private INTERPOLATED_VERBATIUM_STRING_START_action;
|
|
223
|
+
private OPEN_BRACE_action;
|
|
224
|
+
private CLOSE_BRACE_action;
|
|
225
|
+
private COLON_action;
|
|
226
|
+
private OPEN_BRACE_INSIDE_action;
|
|
227
|
+
private DOUBLE_QUOTE_INSIDE_action;
|
|
228
|
+
private CLOSE_BRACE_INSIDE_action;
|
|
229
|
+
sempred(localContext: antlr.ParserRuleContext | null, ruleIndex: number, predIndex: number): boolean;
|
|
230
|
+
private REGULAR_CHAR_INSIDE_sempred;
|
|
231
|
+
private VERBATIUM_DOUBLE_QUOTE_INSIDE_sempred;
|
|
232
|
+
private REGULAR_STRING_INSIDE_sempred;
|
|
233
|
+
private VERBATIUM_INSIDE_STRING_sempred;
|
|
234
|
+
static readonly _serializedATN: number[];
|
|
235
|
+
private static __ATN;
|
|
236
|
+
static get _ATN(): antlr.ATN;
|
|
237
|
+
private static readonly vocabulary;
|
|
238
|
+
get vocabulary(): antlr.Vocabulary;
|
|
239
|
+
private static readonly decisionsToDFA;
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=CSharpLexer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSharpLexer.d.ts","sourceRoot":"","sources":["../../src/generated/CSharpLexer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAGnD,qBAAa,WAAY,SAAQ,eAAe;IAC5C,gBAAuB,eAAe,KAAK;IAC3C,gBAAuB,uBAAuB,KAAK;IACnD,gBAAuB,2BAA2B,KAAK;IACvD,gBAAuB,qBAAqB,KAAK;IACjD,gBAAuB,mBAAmB,KAAK;IAC/C,gBAAuB,iBAAiB,KAAK;IAC7C,gBAAuB,WAAW,KAAK;IACvC,gBAAuB,KAAK,KAAK;IACjC,gBAAuB,QAAQ,KA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