@apexdevtools/apex-parser 4.4.0 → 5.0.0-beta.1

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/README.md +98 -42
  3. package/lib/ApexErrorListener.d.ts +25 -0
  4. package/lib/ApexErrorListener.js +64 -0
  5. package/lib/ApexErrorListener.js.map +1 -0
  6. package/lib/ApexParserFactory.d.ts +69 -0
  7. package/lib/ApexParserFactory.js +125 -0
  8. package/lib/ApexParserFactory.js.map +1 -0
  9. package/lib/CaseInsensitiveInputStream.d.ts +11 -13
  10. package/lib/CaseInsensitiveInputStream.js +22 -28
  11. package/lib/CaseInsensitiveInputStream.js.map +1 -1
  12. package/lib/Check.d.ts +36 -0
  13. package/lib/Check.js +212 -0
  14. package/lib/Check.js.map +1 -0
  15. package/lib/{ApexLexer.d.ts → antlr/ApexLexer.d.ts} +11 -18
  16. package/lib/antlr/ApexLexer.js +1575 -0
  17. package/lib/antlr/ApexLexer.js.map +1 -0
  18. package/lib/{ApexParser.d.ts → antlr/ApexParser.d.ts} +1344 -1304
  19. package/lib/antlr/ApexParser.js +20976 -0
  20. package/lib/antlr/ApexParser.js.map +1 -0
  21. package/lib/{ApexParserListener.d.ts → antlr/ApexParserListener.d.ts} +708 -686
  22. package/lib/antlr/ApexParserListener.js +12 -0
  23. package/lib/antlr/ApexParserListener.js.map +1 -0
  24. package/lib/{ApexParserVisitor.d.ts → antlr/ApexParserVisitor.d.ts} +420 -406
  25. package/lib/antlr/ApexParserVisitor.js +15 -0
  26. package/lib/antlr/ApexParserVisitor.js.map +1 -0
  27. package/lib/index.d.ts +8 -24
  28. package/lib/index.js +13 -140
  29. package/lib/index.js.map +1 -1
  30. package/package.json +30 -27
  31. package/lib/ApexLexer.js +0 -1704
  32. package/lib/ApexLexer.js.map +0 -1
  33. package/lib/ApexParser.js +0 -19514
  34. package/lib/ApexParser.js.map +0 -1
  35. package/lib/ApexParserListener.js +0 -4
  36. package/lib/ApexParserListener.js.map +0 -1
  37. package/lib/ApexParserVisitor.js +0 -4
  38. package/lib/ApexParserVisitor.js.map +0 -1
  39. package/lib/ThrowingErrorListener.d.ts +0 -10
  40. package/lib/ThrowingErrorListener.js +0 -18
  41. package/lib/ThrowingErrorListener.js.map +0 -1
  42. package/lib/__tests__/ApexLexerTest.d.ts +0 -1
  43. package/lib/__tests__/ApexLexerTest.js +0 -48
  44. package/lib/__tests__/ApexLexerTest.js.map +0 -1
  45. package/lib/__tests__/ApexListenerTest.d.ts +0 -1
  46. package/lib/__tests__/ApexListenerTest.js +0 -41
  47. package/lib/__tests__/ApexListenerTest.js.map +0 -1
  48. package/lib/__tests__/ApexParserTest.d.ts +0 -1
  49. package/lib/__tests__/ApexParserTest.js +0 -199
  50. package/lib/__tests__/ApexParserTest.js.map +0 -1
  51. package/lib/__tests__/ApexTriggerTest.d.ts +0 -1
  52. package/lib/__tests__/ApexTriggerTest.js +0 -66
  53. package/lib/__tests__/ApexTriggerTest.js.map +0 -1
  54. package/lib/__tests__/ApexVisitorTest.d.ts +0 -1
  55. package/lib/__tests__/ApexVisitorTest.js +0 -46
  56. package/lib/__tests__/ApexVisitorTest.js.map +0 -1
  57. package/lib/__tests__/SOQLParserTest.d.ts +0 -1
  58. package/lib/__tests__/SOQLParserTest.js +0 -121
  59. package/lib/__tests__/SOQLParserTest.js.map +0 -1
  60. package/lib/__tests__/SOSLParserTest.d.ts +0 -1
  61. package/lib/__tests__/SOSLParserTest.js +0 -101
  62. package/lib/__tests__/SOSLParserTest.js.map +0 -1
  63. package/lib/__tests__/SyntaxErrorCounter.d.ts +0 -10
  64. package/lib/__tests__/SyntaxErrorCounter.js +0 -52
  65. package/lib/__tests__/SyntaxErrorCounter.js.map +0 -1
  66. package/lib/__tests__/system/SampleParseSys.d.ts +0 -1
  67. package/lib/__tests__/system/SampleParseSys.js +0 -75
  68. package/lib/__tests__/system/SampleParseSys.js.map +0 -1
@@ -28,37 +28,31 @@
28
28
  */
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.CaseInsensitiveInputStream = void 0;
31
- class CaseInsensitiveInputStream {
32
- // userData is an untyped identifierfor the stream, for string input use CharStreams.fromString()
33
- constructor(src) {
34
- this.src = src;
35
- }
36
- getText(interval) {
37
- return this.src.getText(interval);
38
- }
39
- consume() {
40
- this.src.consume();
31
+ const antlr4_1 = require("antlr4");
32
+ /**
33
+ * Converts char stream to lower case for case insensitive usage.
34
+ *
35
+ * @deprecated since 5.0.0. ApexLexer is generated with ANTLR 4.10
36
+ * `caseInsensitive` option enabled.
37
+ */
38
+ class CaseInsensitiveInputStream extends antlr4_1.CharStream {
39
+ constructor(data, decodeToUnicodeCodePoints = true) {
40
+ // Default to unicode code points
41
+ // CharStreams.fromString is always `new CharStream(data, true)`
42
+ // but `new CharStream(data)` defaults to false / UTF-16 code units
43
+ if (typeof data === "string") {
44
+ super(data, decodeToUnicodeCodePoints);
45
+ }
46
+ else {
47
+ super(data.toString(), decodeToUnicodeCodePoints);
48
+ }
41
49
  }
42
50
  LA(i) {
43
- return this.toLower(this.src.LA(i));
44
- }
45
- mark() {
46
- return this.src.mark();
47
- }
48
- release(marker) {
49
- this.src.release(marker);
50
- }
51
- get index() {
52
- return this.src.index;
53
- }
54
- seek(index) {
55
- return this.src.seek(index);
56
- }
57
- get size() {
58
- return this.src.size;
51
+ return this.toLower(super.LA(i));
59
52
  }
60
- get sourceName() {
61
- return this.src.sourceName;
53
+ LT(offset) {
54
+ // same behaviour as CharStream
55
+ return this.LA(offset);
62
56
  }
63
57
  // We only need basic upper to lower conversions
64
58
  toLower(c) {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInsensitiveInputStream.js","sourceRoot":"","sources":["../src/CaseInsensitiveInputStream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE;;;AAKF,MAAa,0BAA0B;IAGrC,iGAAiG;IACjG,YAAY,GAAe;QACzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,QAAkB;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED,OAAO;QACL,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;IAED,EAAE,CAAC,CAAS;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;IAED,OAAO,CAAC,MAAc;QACpB,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,KAAa;QAChB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;IAC7B,CAAC;IAED,gDAAgD;IACxC,OAAO,CAAC,CAAS;QACvB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE;YACtB,OAAO,CAAC,GAAG,EAAE,CAAC;SACf;aAAM;YACL,OAAO,CAAC,CAAC;SACV;IACH,CAAC;CACF;AApDD,gEAoDC"}
1
+ {"version":3,"file":"CaseInsensitiveInputStream.js","sourceRoot":"","sources":["../src/CaseInsensitiveInputStream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE;;;AAEF,mCAAoC;AAEpC;;;;;GAKG;AACH,MAAa,0BAA2B,SAAQ,mBAAU;IAGxD,YACE,IAAyB,EACzB,4BAAqC,IAAI;QAEzC,iCAAiC;QACjC,gEAAgE;QAChE,mEAAmE;QACnE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;SACxC;aAAM;YACL,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,yBAAyB,CAAC,CAAC;SACnD;IACH,CAAC;IAED,EAAE,CAAC,CAAS;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IAED,EAAE,CAAC,MAAc;QACf,+BAA+B;QAC/B,OAAO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,gDAAgD;IACxC,OAAO,CAAC,CAAS;QACvB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE;YACtB,OAAO,CAAC,GAAG,EAAE,CAAC;SACf;aAAM;YACL,OAAO,CAAC,CAAC;SACV;IACH,CAAC;CACF;AAlCD,gEAkCC"}
package/lib/Check.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ export interface CheckError {
2
+ column: number;
3
+ line: number;
4
+ message: string;
5
+ path: string;
6
+ }
7
+ export interface CheckResult {
8
+ extensions: string[];
9
+ errors: CheckError[];
10
+ status: number;
11
+ }
12
+ export interface ProjectCheckResult extends CheckResult {
13
+ name: string;
14
+ path: string;
15
+ pkg?: string;
16
+ }
17
+ /**
18
+ * Check Apex files in a path for syntax errors.
19
+ *
20
+ * @param pathStr Path to check. If not provided, uses process.argv or
21
+ * process.cwd().
22
+ * @param fileExt CSV list of file extensions to check
23
+ * (default: `.cls,.trigger,.apex`).
24
+ * @returns Result with status (0 ok, 1 error, 2 missing path) and syntax
25
+ * errors.
26
+ */
27
+ export declare function check(pathStr?: string, fileExt?: string): Promise<CheckResult>;
28
+ /**
29
+ * Check an Apex sfdx-project for syntax errors.
30
+ *
31
+ * @param pathStr Path to directory containing an sfdx-project.json at most 1
32
+ * level deep. If not found, reverts to `check()` behaviour.
33
+ * @returns Result for each package with status (0 ok, 1 error, 2 missing path)
34
+ * and syntax errors.
35
+ */
36
+ export declare function checkProject(pathStr?: string): Promise<ProjectCheckResult[]>;
package/lib/Check.js ADDED
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ /*
3
+ [The "BSD licence"]
4
+ Copyright (c) 2020 Kevin Jones
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions
9
+ are met:
10
+ 1. Redistributions of source code must retain the above copyright
11
+ notice, this list of conditions and the following disclaimer.
12
+ 2. Redistributions in binary form must reproduce the above copyright
13
+ notice, this list of conditions and the following disclaimer in the
14
+ documentation and/or other materials provided with the distribution.
15
+ 3. The name of the author may not be used to endorse or promote products
16
+ derived from this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ */
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.checkProject = exports.check = void 0;
31
+ const promises_1 = require("node:fs/promises");
32
+ const node_fs_1 = require("node:fs");
33
+ const node_path_1 = require("node:path");
34
+ const ApexErrorListener_1 = require("./ApexErrorListener");
35
+ const ApexParserFactory_1 = require("./ApexParserFactory");
36
+ /**
37
+ * Check Apex files in a path for syntax errors.
38
+ *
39
+ * @param pathStr Path to check. If not provided, uses process.argv or
40
+ * process.cwd().
41
+ * @param fileExt CSV list of file extensions to check
42
+ * (default: `.cls,.trigger,.apex`).
43
+ * @returns Result with status (0 ok, 1 error, 2 missing path) and syntax
44
+ * errors.
45
+ */
46
+ async function check(pathStr, fileExt) {
47
+ const path = (0, node_path_1.resolve)(pathStr || process.argv[1] || process.cwd());
48
+ const ext = fileExt || process.argv[2];
49
+ const extensions = ext ? ext.split(",") : [".cls", ".trigger", ".apex"];
50
+ const result = {
51
+ status: 0,
52
+ extensions,
53
+ errors: [],
54
+ };
55
+ if (!(0, node_fs_1.existsSync)(path)) {
56
+ console.error(`Path does not exist, aborting: ${path}`);
57
+ result.status = 2;
58
+ }
59
+ else {
60
+ try {
61
+ result.errors = await parseFiles(path, extensions);
62
+ }
63
+ catch (err) {
64
+ console.error(`Error processing: ${path}`);
65
+ console.error(err);
66
+ result.status = 1;
67
+ }
68
+ }
69
+ process.exitCode = result.status;
70
+ return result;
71
+ }
72
+ exports.check = check;
73
+ /**
74
+ * Check an Apex sfdx-project for syntax errors.
75
+ *
76
+ * @param pathStr Path to directory containing an sfdx-project.json at most 1
77
+ * level deep. If not found, reverts to `check()` behaviour.
78
+ * @returns Result for each package with status (0 ok, 1 error, 2 missing path)
79
+ * and syntax errors.
80
+ */
81
+ async function checkProject(pathStr) {
82
+ const path = (0, node_path_1.resolve)(pathStr || process.argv[1] || process.cwd());
83
+ const ext = ".cls,.trigger";
84
+ const name = (0, node_path_1.basename)(path);
85
+ const project = findProjectFile(path, 1);
86
+ const packages = getProjectPackages(project);
87
+ if (packages.length == 0) {
88
+ console.error(`[${name}]: No valid SFDX project, checking all cls & trigger files`);
89
+ const result = await check(path, ext);
90
+ return [
91
+ {
92
+ name,
93
+ path: ".",
94
+ ...result,
95
+ },
96
+ ];
97
+ }
98
+ const projectDir = (0, node_path_1.dirname)(project);
99
+ const projectResult = await Promise.all(packages.map(async (pkg) => {
100
+ console.log(`[${name}]: Checking package "${pkg}"`);
101
+ const pkgPath = (0, node_path_1.resolve)(projectDir, pkg);
102
+ const result = await check(pkgPath, ext);
103
+ return {
104
+ name,
105
+ pkg,
106
+ path: (0, node_path_1.relative)(path, pkgPath),
107
+ ...result,
108
+ };
109
+ }));
110
+ process.exitCode = Math.max(...projectResult.map(r => r.status));
111
+ return projectResult;
112
+ }
113
+ exports.checkProject = checkProject;
114
+ class CheckApexErrorListener extends ApexErrorListener_1.ApexErrorListener {
115
+ constructor(relativePath) {
116
+ super();
117
+ this.errors = [];
118
+ this.path = relativePath;
119
+ }
120
+ apexSyntaxError(line, column, message) {
121
+ const error = {
122
+ column,
123
+ line,
124
+ message,
125
+ path: this.path,
126
+ };
127
+ console.log(JSON.stringify(error));
128
+ this.errors.push(error);
129
+ }
130
+ getErrors() {
131
+ return this.errors;
132
+ }
133
+ }
134
+ async function parseFiles(path, extensions) {
135
+ const parsers = {
136
+ ".cls": parser => parser.compilationUnit(),
137
+ ".trigger": parser => parser.triggerUnit(),
138
+ ".apex": parser => parser.anonymousUnit(),
139
+ };
140
+ const ext = Object.keys(parsers);
141
+ extensions.forEach(e => {
142
+ if (!ext.includes(e)) {
143
+ throw new Error(`Unknown extension '${e}' - one or more of [${ext.join(",")}] required.`);
144
+ }
145
+ });
146
+ const files = await getPathsInDir(path, extensions);
147
+ return extensions.flatMap(ext => parseByType(path, files, ext, parsers[ext]));
148
+ }
149
+ async function getPathsInDir(path, ext) {
150
+ const dirent = await (0, promises_1.readdir)(path, {
151
+ withFileTypes: true,
152
+ recursive: true,
153
+ });
154
+ return dirent.reduce((files, ent) => {
155
+ if (ent.isFile() && ext.includes((0, node_path_1.extname)(ent.name))) {
156
+ files.push((0, node_path_1.join)(ent.parentPath, ent.name));
157
+ }
158
+ return files;
159
+ }, []);
160
+ }
161
+ function parseByType(rootPath, files, endsWith, operation) {
162
+ let parsedCount = 0;
163
+ const errors = [];
164
+ files
165
+ .filter(name => name.endsWith(endsWith))
166
+ .forEach(file => {
167
+ if ((0, node_fs_1.lstatSync)(file).isFile()) {
168
+ const parser = ApexParserFactory_1.ApexParserFactory.createParser((0, node_fs_1.readFileSync)(file).toString());
169
+ const relativePath = (0, node_path_1.relative)(rootPath, file);
170
+ const listener = new CheckApexErrorListener(relativePath);
171
+ parser.addErrorListener(listener);
172
+ operation(parser);
173
+ const fileErrors = listener.getErrors();
174
+ if (fileErrors.length) {
175
+ console.log(`Found ${fileErrors.length} syntax errors in: ${relativePath}`);
176
+ errors.push(...fileErrors);
177
+ }
178
+ parsedCount += 1;
179
+ }
180
+ });
181
+ console.log(`Parsed ${parsedCount} '${endsWith}' files in: ${rootPath}`);
182
+ return errors;
183
+ }
184
+ function findProjectFile(wd, depth) {
185
+ const proj = "sfdx-project.json";
186
+ const files = (0, node_fs_1.readdirSync)(wd).filter(i => !/(^|\/)\.[^/.]/g.test(i));
187
+ if (files.includes(proj)) {
188
+ return (0, node_path_1.resolve)(wd, proj);
189
+ }
190
+ if (depth) {
191
+ const dirs = files
192
+ .map(f => (0, node_path_1.resolve)(wd, f))
193
+ .filter(f => (0, node_fs_1.lstatSync)(f).isDirectory());
194
+ const newDepth = depth - 1;
195
+ for (const d of dirs) {
196
+ const p = findProjectFile(d, newDepth);
197
+ if (p) {
198
+ return p;
199
+ }
200
+ }
201
+ }
202
+ return undefined;
203
+ }
204
+ function getProjectPackages(projectFilePath) {
205
+ if (!projectFilePath) {
206
+ return [];
207
+ }
208
+ const config = JSON.parse((0, node_fs_1.readFileSync)(projectFilePath, { encoding: "utf8" }));
209
+ const packages = config.packageDirectories || [];
210
+ return packages.flatMap(p => (p.path ? p.path.replace(/\\/g, "/") : []));
211
+ }
212
+ //# sourceMappingURL=Check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Check.js","sourceRoot":"","sources":["../src/Check.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE;;;AAEF,+CAA2C;AAC3C,qCAA2E;AAC3E,yCAAgF;AAEhF,2DAAwD;AACxD,2DAAwD;AAqBxD;;;;;;;;;GASG;AACI,KAAK,UAAU,KAAK,CACzB,OAAgB,EAChB,OAAgB;IAEhB,MAAM,IAAI,GAAG,IAAA,mBAAO,EAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAClE,MAAM,GAAG,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAExE,MAAM,MAAM,GAAgB;QAC1B,MAAM,EAAE,CAAC;QACT,UAAU;QACV,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,IAAI,CAAC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE;QACrB,OAAO,CAAC,KAAK,CAAC,kCAAkC,IAAI,EAAE,CAAC,CAAC;QACxD,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;KACnB;SAAM;QACL,IAAI;YACF,MAAM,CAAC,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;SACpD;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;YAC3C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,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O,IAAA,mBAAO,EAAC,EAAE,EAAE,IAAI,CAAC,CAAC;KAC1B;IACD,IAAI,KAAK,EAAE;QACT,MAAM,IAAI,GAAG,KAAK;aACf,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,mBAAO,EAAC,EAAE,EAAE,CAAC,CAAC,CAAC;aACxB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,mBAAS,EAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;YACpB,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YACvC,IAAI,CAAC,EAAE;gBACL,OAAO,CAAC,CAAC;aACV;SACF;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,kBAAkB,CAAC,eAAwB;IAClD,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,MAAM,GAIR,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACpE,MAAM,QAAQ,GAAG,MAAM,CAAC,kBAAkB,IAAI,EAAE,CAAC;IACjD,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -1,8 +1,5 @@
1
- import { ATN } from "antlr4ts/atn/ATN";
2
- import { CharStream } from "antlr4ts/CharStream";
3
- import { Lexer } from "antlr4ts/Lexer";
4
- import { Vocabulary } from "antlr4ts/Vocabulary";
5
- export declare class ApexLexer extends Lexer {
1
+ import { ATN, CharStream, DFA, Lexer } from "antlr4";
2
+ export default class ApexLexer extends Lexer {
6
3
  static readonly ABSTRACT = 1;
7
4
  static readonly AFTER = 2;
8
5
  static readonly BEFORE = 3;
@@ -254,28 +251,24 @@ export declare class ApexLexer extends Lexer {
254
251
  static readonly DOC_COMMENT = 249;
255
252
  static readonly COMMENT = 250;
256
253
  static readonly LINE_COMMENT = 251;
254
+ static readonly EOF: number;
257
255
  static readonly WHITESPACE_CHANNEL = 2;
258
256
  static readonly COMMENT_CHANNEL = 3;
259
257
  static readonly channelNames: string[];
258
+ static readonly literalNames: (string | null)[];
259
+ static readonly symbolicNames: (string | null)[];
260
260
  static readonly modeNames: string[];
261
261
  static readonly ruleNames: string[];
262
- private static readonly _LITERAL_NAMES;
263
- private static readonly _SYMBOLIC_NAMES;
264
- static readonly VOCABULARY: Vocabulary;
265
- get vocabulary(): Vocabulary;
266
262
  constructor(input: CharStream);
267
263
  get grammarFileName(): string;
264
+ get literalNames(): (string | null)[];
265
+ get symbolicNames(): (string | null)[];
268
266
  get ruleNames(): string[];
269
- get serializedATN(): string;
267
+ get serializedATN(): number[];
270
268
  get channelNames(): string[];
271
269
  get modeNames(): string[];
272
- private static readonly _serializedATNSegments;
273
- private static readonly _serializedATNSegment0;
274
- private static readonly _serializedATNSegment1;
275
- private static readonly _serializedATNSegment2;
276
- private static readonly _serializedATNSegment3;
277
- private static readonly _serializedATNSegment4;
278
- static readonly _serializedATN: string;
279
- static __ATN: ATN;
270
+ static readonly _serializedATN: number[];
271
+ private static __ATN;
280
272
  static get _ATN(): ATN;
273
+ static DecisionsToDFA: DFA[];
281
274
  }