mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-08 03:08:13 +00:00
reorganise
This commit is contained in:
parent
0c98923729
commit
00c90d476f
4 changed files with 9 additions and 9 deletions
|
|
@ -143,15 +143,15 @@ const extractJavaPatternBinding: PatternBindingExtractor = (node) => {
|
|||
|
||||
export const javaTypeConfig: LanguageTypeConfig = {
|
||||
declarationNodeTypes: JAVA_DECLARATION_NODE_TYPES,
|
||||
forLoopNodeTypes: JAVA_FOR_LOOP_NODE_TYPES,
|
||||
patternBindingNodeTypes: new Set(['instanceof_expression']),
|
||||
extractDeclaration: extractJavaDeclaration,
|
||||
extractParameter: extractJavaParameter,
|
||||
extractInitializer: extractJavaInitializer,
|
||||
scanConstructorBinding: scanJavaConstructorBinding,
|
||||
forLoopNodeTypes: JAVA_FOR_LOOP_NODE_TYPES,
|
||||
extractForLoopBinding: extractJavaForLoopBinding,
|
||||
extractPendingAssignment: extractJavaPendingAssignment,
|
||||
extractPatternBinding: extractJavaPatternBinding,
|
||||
patternBindingNodeTypes: new Set(['instanceof_expression']),
|
||||
};
|
||||
|
||||
// ── Kotlin ────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -344,6 +344,7 @@ const PATTERN_BINDING_NODE_TYPES: ReadonlySet<string> = new Set(['as_pattern']);
|
|||
export const typeConfig: LanguageTypeConfig = {
|
||||
declarationNodeTypes: DECLARATION_NODE_TYPES,
|
||||
forLoopNodeTypes: FOR_LOOP_NODE_TYPES,
|
||||
patternBindingNodeTypes: PATTERN_BINDING_NODE_TYPES,
|
||||
extractDeclaration,
|
||||
extractParameter,
|
||||
extractInitializer,
|
||||
|
|
@ -351,5 +352,4 @@ export const typeConfig: LanguageTypeConfig = {
|
|||
extractForLoopBinding,
|
||||
extractPendingAssignment,
|
||||
extractPatternBinding,
|
||||
patternBindingNodeTypes: PATTERN_BINDING_NODE_TYPES,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -271,11 +271,11 @@ const extractPatternBinding: PatternBindingExtractor = (
|
|||
|
||||
export const typeConfig: LanguageTypeConfig = {
|
||||
declarationNodeTypes: DECLARATION_NODE_TYPES,
|
||||
patternBindingNodeTypes: new Set(['let_condition']),
|
||||
extractDeclaration,
|
||||
extractInitializer,
|
||||
extractParameter,
|
||||
scanConstructorBinding,
|
||||
extractPendingAssignment,
|
||||
extractPatternBinding,
|
||||
patternBindingNodeTypes: new Set(['let_condition']),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ export interface LanguageTypeConfig {
|
|||
declarationNodeTypes: ReadonlySet<string>;
|
||||
/** AST node types for for-each/for-in statements with explicit element types. */
|
||||
forLoopNodeTypes?: ReadonlySet<string>;
|
||||
/** Optional allowlist of AST node types on which extractPatternBinding should run.
|
||||
* When present, extractPatternBinding is only invoked for nodes whose type is in this set,
|
||||
* short-circuiting the call for all other node types. When absent, every node is passed to
|
||||
* extractPatternBinding (legacy behaviour). */
|
||||
patternBindingNodeTypes?: ReadonlySet<string>;
|
||||
/** Extract a (varName → typeName) binding from a declaration node */
|
||||
extractDeclaration: TypeBindingExtractor;
|
||||
/** Extract a (varName → typeName) binding from a parameter node */
|
||||
|
|
@ -91,9 +96,4 @@ export interface LanguageTypeConfig {
|
|||
* The extractor receives the current scope's resolved bindings (read-only) to look up the
|
||||
* source variable's type. Returns undefined for non-matching nodes or unknown source types. */
|
||||
extractPatternBinding?: PatternBindingExtractor;
|
||||
/** Optional allowlist of AST node types on which extractPatternBinding should run.
|
||||
* When present, extractPatternBinding is only invoked for nodes whose type is in this set,
|
||||
* short-circuiting the call for all other node types. When absent, every node is passed to
|
||||
* extractPatternBinding (legacy behaviour). */
|
||||
patternBindingNodeTypes?: ReadonlySet<string>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue