sf-agentpmd 0.1.0 → 0.1.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.
- package/NOTICE +7 -5
- package/dist/commands/agentpmd/analyze.js +4141 -109
- package/dist/commands/agentpmd/analyze.js.map +7 -1
- package/dist/commands/agentpmd/install-skill.js +27 -30
- package/dist/commands/agentpmd/install-skill.js.map +7 -1
- package/dist/index.js +4155 -3
- package/dist/index.js.map +7 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -8
- package/dist/analyzer/action-references.d.ts +0 -21
- package/dist/analyzer/action-references.js +0 -130
- package/dist/analyzer/action-references.js.map +0 -1
- package/dist/analyzer/analyze.d.ts +0 -43
- package/dist/analyzer/analyze.js +0 -222
- package/dist/analyzer/analyze.js.map +0 -1
- package/dist/analyzer/apex-analyze.d.ts +0 -14
- package/dist/analyzer/apex-analyze.js +0 -60
- package/dist/analyzer/apex-analyze.js.map +0 -1
- package/dist/analyzer/apex-complexity.d.ts +0 -27
- package/dist/analyzer/apex-complexity.js +0 -133
- package/dist/analyzer/apex-complexity.js.map +0 -1
- package/dist/analyzer/apex-parse.d.ts +0 -39
- package/dist/analyzer/apex-parse.js +0 -32
- package/dist/analyzer/apex-parse.js.map +0 -1
- package/dist/analyzer/apex-resolve.d.ts +0 -32
- package/dist/analyzer/apex-resolve.js +0 -59
- package/dist/analyzer/apex-resolve.js.map +0 -1
- package/dist/analyzer/complexity.d.ts +0 -30
- package/dist/analyzer/complexity.js +0 -126
- package/dist/analyzer/complexity.js.map +0 -1
- package/dist/analyzer/parse.d.ts +0 -51
- package/dist/analyzer/parse.js +0 -143
- package/dist/analyzer/parse.js.map +0 -1
- package/dist/analyzer/project.d.ts +0 -12
- package/dist/analyzer/project.js +0 -51
- package/dist/analyzer/project.js.map +0 -1
- package/dist/analyzer/types.d.ts +0 -76
- package/dist/analyzer/types.js +0 -2
- package/dist/analyzer/types.js.map +0 -1
- package/dist/commands/agentpmd/analyze.d.ts +0 -20
- package/dist/commands/agentpmd/install-skill.d.ts +0 -11
- package/dist/index.d.ts +0 -3
- package/dist/renderers/csv.d.ts +0 -6
- package/dist/renderers/csv.js +0 -78
- package/dist/renderers/csv.js.map +0 -1
- package/dist/renderers/index.d.ts +0 -8
- package/dist/renderers/index.js +0 -25
- package/dist/renderers/index.js.map +0 -1
- package/dist/renderers/markdown.d.ts +0 -12
- package/dist/renderers/markdown.js +0 -233
- package/dist/renderers/markdown.js.map +0 -1
- package/dist/renderers/options.d.ts +0 -20
- package/dist/renderers/options.js +0 -2
- package/dist/renderers/options.js.map +0 -1
- package/dist/renderers/sarif.d.ts +0 -3
- package/dist/renderers/sarif.js +0 -131
- package/dist/renderers/sarif.js.map +0 -1
- package/dist/renderers/text.d.ts +0 -3
- package/dist/renderers/text.js +0 -243
- package/dist/renderers/text.js.map +0 -1
- package/vendor/agentscript-parser-javascript/dist/cst-node.d.ts +0 -83
- package/vendor/agentscript-parser-javascript/dist/cst-node.js +0 -238
- package/vendor/agentscript-parser-javascript/dist/errors.d.ts +0 -34
- package/vendor/agentscript-parser-javascript/dist/errors.js +0 -74
- package/vendor/agentscript-parser-javascript/dist/expressions.d.ts +0 -36
- package/vendor/agentscript-parser-javascript/dist/expressions.js +0 -682
- package/vendor/agentscript-parser-javascript/dist/highlighter.d.ts +0 -24
- package/vendor/agentscript-parser-javascript/dist/highlighter.js +0 -260
- package/vendor/agentscript-parser-javascript/dist/index.d.ts +0 -29
- package/vendor/agentscript-parser-javascript/dist/index.js +0 -35
- package/vendor/agentscript-parser-javascript/dist/lexer.d.ts +0 -60
- package/vendor/agentscript-parser-javascript/dist/lexer.js +0 -630
- package/vendor/agentscript-parser-javascript/dist/parse-mapping.d.ts +0 -46
- package/vendor/agentscript-parser-javascript/dist/parse-mapping.js +0 -549
- package/vendor/agentscript-parser-javascript/dist/parse-sequence.d.ts +0 -10
- package/vendor/agentscript-parser-javascript/dist/parse-sequence.js +0 -118
- package/vendor/agentscript-parser-javascript/dist/parse-statements.d.ts +0 -15
- package/vendor/agentscript-parser-javascript/dist/parse-statements.js +0 -519
- package/vendor/agentscript-parser-javascript/dist/parse-templates.d.ts +0 -15
- package/vendor/agentscript-parser-javascript/dist/parse-templates.js +0 -323
- package/vendor/agentscript-parser-javascript/dist/parser.d.ts +0 -65
- package/vendor/agentscript-parser-javascript/dist/parser.js +0 -163
- package/vendor/agentscript-parser-javascript/dist/recovery.d.ts +0 -51
- package/vendor/agentscript-parser-javascript/dist/recovery.js +0 -199
- package/vendor/agentscript-parser-javascript/dist/token.d.ts +0 -58
- package/vendor/agentscript-parser-javascript/dist/token.js +0 -62
- package/vendor/agentscript-parser-javascript/package.json +0 -19
- package/vendor/agentscript-types/dist/comment.d.ts +0 -11
- package/vendor/agentscript-types/dist/comment.js +0 -10
- package/vendor/agentscript-types/dist/cst.d.ts +0 -7
- package/vendor/agentscript-types/dist/cst.js +0 -8
- package/vendor/agentscript-types/dist/diagnostic.d.ts +0 -34
- package/vendor/agentscript-types/dist/diagnostic.js +0 -23
- package/vendor/agentscript-types/dist/index.d.ts +0 -9
- package/vendor/agentscript-types/dist/index.js +0 -10
- package/vendor/agentscript-types/dist/position.d.ts +0 -11
- package/vendor/agentscript-types/dist/position.js +0 -16
- package/vendor/agentscript-types/dist/syntax-node.d.ts +0 -39
- package/vendor/agentscript-types/dist/syntax-node.js +0 -8
- package/vendor/agentscript-types/package.json +0 -15
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
* For full license text, see the LICENSE file in the repo root or https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Walk the CST and produce highlight captures matching highlights.scm.
|
|
9
|
-
*
|
|
10
|
-
* Tree-sitter query priority: later patterns override earlier ones.
|
|
11
|
-
* We replicate this by first assigning generic captures, then overriding
|
|
12
|
-
* with contextual ones (e.g., id → variable, then key > id → property).
|
|
13
|
-
*/
|
|
14
|
-
export function highlight(root) {
|
|
15
|
-
const captures = [];
|
|
16
|
-
walkNode(root, captures);
|
|
17
|
-
return captures;
|
|
18
|
-
}
|
|
19
|
-
function capture(node, name, captures) {
|
|
20
|
-
captures.push({
|
|
21
|
-
name,
|
|
22
|
-
text: node.text,
|
|
23
|
-
startRow: node.startRow,
|
|
24
|
-
startCol: node.startCol,
|
|
25
|
-
endRow: node.endRow,
|
|
26
|
-
endCol: node.endCol,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function walkNode(node, captures) {
|
|
30
|
-
// --- Named node type-based captures ---
|
|
31
|
-
switch (node.type) {
|
|
32
|
-
case 'comment':
|
|
33
|
-
capture(node, 'comment', captures);
|
|
34
|
-
return; // Don't recurse into comments
|
|
35
|
-
case 'number':
|
|
36
|
-
capture(node, 'number', captures);
|
|
37
|
-
return;
|
|
38
|
-
case 'string':
|
|
39
|
-
capture(node, 'string', captures);
|
|
40
|
-
// Recurse to get escape_sequence captures
|
|
41
|
-
for (const child of node.children) {
|
|
42
|
-
if (child.type === 'escape_sequence') {
|
|
43
|
-
capture(child, 'string.escape', captures);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return;
|
|
47
|
-
case 'string_content':
|
|
48
|
-
capture(node, 'string', captures);
|
|
49
|
-
return;
|
|
50
|
-
case 'escape_sequence':
|
|
51
|
-
capture(node, 'string.escape', captures);
|
|
52
|
-
return;
|
|
53
|
-
case 'template_content':
|
|
54
|
-
capture(node, 'string', captures);
|
|
55
|
-
return;
|
|
56
|
-
case 'ellipsis':
|
|
57
|
-
capture(node, 'constant.builtin', captures);
|
|
58
|
-
return;
|
|
59
|
-
case 'id':
|
|
60
|
-
captureId(node, captures);
|
|
61
|
-
return;
|
|
62
|
-
case 'at_id':
|
|
63
|
-
captureAtId(node, captures);
|
|
64
|
-
return;
|
|
65
|
-
case 'template_expression':
|
|
66
|
-
captureTemplateExpression(node, captures);
|
|
67
|
-
return;
|
|
68
|
-
case 'variable_declaration':
|
|
69
|
-
captureVariableDeclaration(node, captures);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
// --- Anonymous node captures (punctuation, keywords, operators) ---
|
|
73
|
-
if (!node.isNamed && node.children.length === 0) {
|
|
74
|
-
captureAnonymous(node, captures);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// Recurse into children
|
|
78
|
-
for (const child of node.children) {
|
|
79
|
-
walkNode(child, captures);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/** Check if a key node belongs to a root-level mapping element (source_file > mapping > mapping_element > key). */
|
|
83
|
-
function isRootLevelKey(keyNode) {
|
|
84
|
-
const mappingElement = keyNode.parent;
|
|
85
|
-
if (mappingElement?.type !== 'mapping_element')
|
|
86
|
-
return false;
|
|
87
|
-
const mapping = mappingElement.parent;
|
|
88
|
-
if (mapping?.type !== 'mapping')
|
|
89
|
-
return false;
|
|
90
|
-
return mapping.parent?.type === 'source_file';
|
|
91
|
-
}
|
|
92
|
-
/** Capture an identifier based on its parent context. */
|
|
93
|
-
function captureId(node, captures) {
|
|
94
|
-
const parent = node.parent;
|
|
95
|
-
// Constants: True, False, None
|
|
96
|
-
if (node.text === 'True' || node.text === 'False' || node.text === 'None') {
|
|
97
|
-
capture(node, 'constant.builtin', captures);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
// Inside at_id: @identifier → module (namespace)
|
|
101
|
-
if (parent?.type === 'at_id') {
|
|
102
|
-
capture(node, 'module', captures);
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
// Mapping key: (key (id)) → property, or block keyword/name at root level
|
|
106
|
-
if (parent?.type === 'key') {
|
|
107
|
-
if (isRootLevelKey(parent)) {
|
|
108
|
-
const namedSiblings = parent.namedChildren;
|
|
109
|
-
if (namedSiblings.length > 0 && namedSiblings[0] === node) {
|
|
110
|
-
capture(node, 'keyword.block', captures);
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
capture(node, 'keyword.block.name', captures);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
capture(node, 'key', captures);
|
|
118
|
-
}
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
// Member expression: expr.id → variable (the property after dot)
|
|
122
|
-
if (parent?.type === 'member_expression') {
|
|
123
|
-
// Only the trailing id (not the expression part)
|
|
124
|
-
const parentChildren = parent.namedChildren;
|
|
125
|
-
if (parentChildren.length > 0 &&
|
|
126
|
-
parentChildren[parentChildren.length - 1] === node) {
|
|
127
|
-
capture(node, 'variable', captures);
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// With-statement param: with param=value → variable
|
|
132
|
-
if (parent?.type === 'with_statement') {
|
|
133
|
-
const fieldName = parent.fieldNameForChild(node._childIndex);
|
|
134
|
-
if (fieldName === 'param') {
|
|
135
|
-
capture(node, 'variable', captures);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// Default: variable
|
|
140
|
-
capture(node, 'variable', captures);
|
|
141
|
-
}
|
|
142
|
-
/** Capture @identifier — the @ and the id inside. */
|
|
143
|
-
function captureAtId(node, captures) {
|
|
144
|
-
for (const child of node.children) {
|
|
145
|
-
if (child.type === '@' || child.text === '@') {
|
|
146
|
-
capture(child, 'decorator', captures);
|
|
147
|
-
}
|
|
148
|
-
else if (child.type === 'id') {
|
|
149
|
-
capture(child, 'module', captures);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
/** Capture template expression delimiters {! and }. */
|
|
154
|
-
function captureTemplateExpression(node, captures) {
|
|
155
|
-
for (const child of node.children) {
|
|
156
|
-
if (child.text === '{!') {
|
|
157
|
-
capture(child, 'punctuation.template', captures);
|
|
158
|
-
}
|
|
159
|
-
else if (child.text === '}') {
|
|
160
|
-
capture(child, 'punctuation.template', captures);
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
walkNode(child, captures);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/** Capture variable declaration modifiers (mutable/linked). */
|
|
168
|
-
function captureVariableDeclaration(node, captures) {
|
|
169
|
-
for (const child of node.children) {
|
|
170
|
-
if (!child.isNamed &&
|
|
171
|
-
(child.text === 'mutable' || child.text === 'linked')) {
|
|
172
|
-
capture(child, 'keyword.modifier', captures);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
walkNode(child, captures);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/** Capture anonymous nodes: keywords, operators, punctuation. */
|
|
180
|
-
function captureAnonymous(node, captures) {
|
|
181
|
-
const text = node.text;
|
|
182
|
-
// Keywords
|
|
183
|
-
switch (text) {
|
|
184
|
-
case 'if':
|
|
185
|
-
case 'elif':
|
|
186
|
-
case 'else':
|
|
187
|
-
case 'run':
|
|
188
|
-
case 'with':
|
|
189
|
-
case 'set':
|
|
190
|
-
case 'transition':
|
|
191
|
-
case 'available':
|
|
192
|
-
case 'when':
|
|
193
|
-
case 'and':
|
|
194
|
-
case 'or':
|
|
195
|
-
case 'not':
|
|
196
|
-
case 'is':
|
|
197
|
-
case 'to':
|
|
198
|
-
capture(node, 'keyword', captures);
|
|
199
|
-
return;
|
|
200
|
-
case 'mutable':
|
|
201
|
-
case 'linked':
|
|
202
|
-
capture(node, 'keyword.modifier', captures);
|
|
203
|
-
return;
|
|
204
|
-
case 'True':
|
|
205
|
-
case 'False':
|
|
206
|
-
case 'None':
|
|
207
|
-
capture(node, 'constant.builtin', captures);
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
// Operators
|
|
211
|
-
switch (text) {
|
|
212
|
-
case '==':
|
|
213
|
-
case '!=':
|
|
214
|
-
case '<':
|
|
215
|
-
case '>':
|
|
216
|
-
case '<=':
|
|
217
|
-
case '>=':
|
|
218
|
-
case '+':
|
|
219
|
-
case '*':
|
|
220
|
-
case '/':
|
|
221
|
-
case '=':
|
|
222
|
-
capture(node, 'operator', captures);
|
|
223
|
-
return;
|
|
224
|
-
case '-':
|
|
225
|
-
// '-' in sequence dash is punctuation.special, otherwise operator
|
|
226
|
-
if (node.parent?.type === 'sequence_element') {
|
|
227
|
-
capture(node, 'punctuation.special', captures);
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
capture(node, 'operator', captures);
|
|
231
|
-
}
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
// Punctuation
|
|
235
|
-
switch (text) {
|
|
236
|
-
case ':':
|
|
237
|
-
case '.':
|
|
238
|
-
case ',':
|
|
239
|
-
capture(node, 'punctuation.delimiter', captures);
|
|
240
|
-
return;
|
|
241
|
-
case '[':
|
|
242
|
-
case ']':
|
|
243
|
-
case '{':
|
|
244
|
-
case '}':
|
|
245
|
-
capture(node, 'punctuation.bracket', captures);
|
|
246
|
-
return;
|
|
247
|
-
case '|':
|
|
248
|
-
case '->':
|
|
249
|
-
case '- ':
|
|
250
|
-
capture(node, 'punctuation.special', captures);
|
|
251
|
-
return;
|
|
252
|
-
case '@':
|
|
253
|
-
capture(node, 'decorator', captures);
|
|
254
|
-
return;
|
|
255
|
-
case '"':
|
|
256
|
-
capture(node, 'string', captures);
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
//# sourceMappingURL=highlighter.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agentscript/parser-javascript — Hand-written TypeScript parser for AgentScript.
|
|
3
|
-
*
|
|
4
|
-
* Error-tolerant: NEWLINE and DEDENT are unconditional recovery points.
|
|
5
|
-
*/
|
|
6
|
-
export { CSTNode } from './cst-node.js';
|
|
7
|
-
export type { SyntaxNode } from '@agentscript/types';
|
|
8
|
-
export { TokenKind } from './token.js';
|
|
9
|
-
export type { Token, Position } from './token.js';
|
|
10
|
-
export type { TokenStream, NodeBuilder, ParserContext } from './parser.js';
|
|
11
|
-
export { highlight } from './highlighter.js';
|
|
12
|
-
export type { HighlightCapture } from './highlighter.js';
|
|
13
|
-
import type { CSTNode } from './cst-node.js';
|
|
14
|
-
import type { HighlightCapture } from './highlighter.js';
|
|
15
|
-
/**
|
|
16
|
-
* Parse AgentScript source code and return a CST.
|
|
17
|
-
* The returned rootNode implements the SyntaxNode interface
|
|
18
|
-
* used by all consumers (dialect, LSP, monaco, agentforce).
|
|
19
|
-
*/
|
|
20
|
-
export declare function parse(source: string): {
|
|
21
|
-
rootNode: CSTNode;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Parse and highlight source code in one call.
|
|
25
|
-
* Returns captures compatible with the QueryCapture format
|
|
26
|
-
* used by LSP semantic tokens.
|
|
27
|
-
*/
|
|
28
|
-
export declare function parseAndHighlight(source: string): HighlightCapture[];
|
|
29
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
* For full license text, see the LICENSE file in the repo root or https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @agentscript/parser-javascript — Hand-written TypeScript parser for AgentScript.
|
|
9
|
-
*
|
|
10
|
-
* Error-tolerant: NEWLINE and DEDENT are unconditional recovery points.
|
|
11
|
-
*/
|
|
12
|
-
export { CSTNode } from './cst-node.js';
|
|
13
|
-
export { TokenKind } from './token.js';
|
|
14
|
-
export { highlight } from './highlighter.js';
|
|
15
|
-
import { Parser } from './parser.js';
|
|
16
|
-
import { highlight } from './highlighter.js';
|
|
17
|
-
/**
|
|
18
|
-
* Parse AgentScript source code and return a CST.
|
|
19
|
-
* The returned rootNode implements the SyntaxNode interface
|
|
20
|
-
* used by all consumers (dialect, LSP, monaco, agentforce).
|
|
21
|
-
*/
|
|
22
|
-
export function parse(source) {
|
|
23
|
-
const parser = new Parser(source);
|
|
24
|
-
return { rootNode: parser.parse() };
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Parse and highlight source code in one call.
|
|
28
|
-
* Returns captures compatible with the QueryCapture format
|
|
29
|
-
* used by LSP semantic tokens.
|
|
30
|
-
*/
|
|
31
|
-
export function parseAndHighlight(source) {
|
|
32
|
-
const { rootNode } = parse(source);
|
|
33
|
-
return highlight(rootNode);
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { type Token } from './token.js';
|
|
2
|
-
export declare class Lexer {
|
|
3
|
-
private source;
|
|
4
|
-
private offset;
|
|
5
|
-
private row;
|
|
6
|
-
private col;
|
|
7
|
-
private tokens;
|
|
8
|
-
private indentStack;
|
|
9
|
-
/** True when the current line started with `|` (template line). */
|
|
10
|
-
private onTemplateLine;
|
|
11
|
-
/** Indent level of the line containing `|`. Content deeper than this is template content. */
|
|
12
|
-
private templateBaseIndent;
|
|
13
|
-
/** Nested brace depth inside a template expression (for `{` inside `{!...}`). -1 means not inside a template expression. */
|
|
14
|
-
private templateExprBraceDepth;
|
|
15
|
-
private get inTemplateExpr();
|
|
16
|
-
/** Parenthesis depth — suppresses INDENT/DEDENT/NEWLINE when > 0 to support multi-line call expressions. */
|
|
17
|
-
private bracketDepth;
|
|
18
|
-
constructor(source: string);
|
|
19
|
-
tokenize(): Token[];
|
|
20
|
-
private tokenizeLine;
|
|
21
|
-
private emitIndentation;
|
|
22
|
-
private tokenizeToken;
|
|
23
|
-
private tokenizeId;
|
|
24
|
-
private tokenizeNumber;
|
|
25
|
-
private tryDatetime;
|
|
26
|
-
private tokenizeString;
|
|
27
|
-
private tokenizeComment;
|
|
28
|
-
private consumeIndentation;
|
|
29
|
-
/**
|
|
30
|
-
* Scan ahead (without advancing) past comment/blank lines to find the indent
|
|
31
|
-
* of the next line with real (non-comment) content. Returns -1 if only
|
|
32
|
-
* comments, blanks, or EOF remain. Matches tree-sitter scanner behavior which
|
|
33
|
-
* skips past comment-only lines when computing INDENT/DEDENT.
|
|
34
|
-
*/
|
|
35
|
-
private peekNextContentIndent;
|
|
36
|
-
private peekCharCode;
|
|
37
|
-
private get hasMore();
|
|
38
|
-
/**
|
|
39
|
-
* Attempt to advance n characters.
|
|
40
|
-
* @returns how many characters were advanced.
|
|
41
|
-
*/
|
|
42
|
-
private advance;
|
|
43
|
-
/**
|
|
44
|
-
* Attempt to consume a newline.
|
|
45
|
-
* @returns whether a newline was consumed.
|
|
46
|
-
*/
|
|
47
|
-
private consumeNewline;
|
|
48
|
-
/**
|
|
49
|
-
* Checks if the current position is at a newline.
|
|
50
|
-
* @param additiveOffset
|
|
51
|
-
* @returns 0 if not at a newline, 1 if at an LF newline, 2 if at a CR LF newline.
|
|
52
|
-
*/
|
|
53
|
-
private atNewline;
|
|
54
|
-
private get position();
|
|
55
|
-
private emitSpan;
|
|
56
|
-
private emit;
|
|
57
|
-
private emitVirtual;
|
|
58
|
-
private makeToken;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=lexer.d.ts.map
|