Skip to content

JavaScript: Colorize pattern matching debug output#6316

Draft
knutwannheden wants to merge 8 commits intomainfrom
debug-colors
Draft

JavaScript: Colorize pattern matching debug output#6316
knutwannheden wants to merge 8 commits intomainfrom
debug-colors

Conversation

@knutwannheden
Copy link
Copy Markdown
Contributor

@knutwannheden knutwannheden commented Nov 20, 2025

  • Extract debug logging functionality from comparator into dedicated debug.ts module (~800 LOC)
  • Introduce JTree type union for all LST node types to improve type safety across comparators
  • Add generic type parameters to mismatch methods to preserve type information
  • Improve cursor positioning in constraint evaluation by using actual target elements
  • Fix container printing order (markers now printed after closing delimiter)
image

# Conflicts:
#	rewrite-javascript/rewrite/fixtures/change-text.ts
#	rewrite-javascript/rewrite/src/javascript/templating/comparator.ts
#	rewrite-javascript/rewrite/src/javascript/templating/pattern.ts
#	rewrite-javascript/rewrite/src/javascript/templating/template.ts
# Conflicts:
#	rewrite-javascript/rewrite/src/test/rewrite-test.ts
#	rewrite-javascript/rewrite/test/javascript/templating/pattern-debug-logging.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant