Skip to content

fix: mapping and function parameter highlighting#499

Open
davidperk wants to merge 1 commit intojuanfranblanco:masterfrom
davidperk:syntax-highlighting
Open

fix: mapping and function parameter highlighting#499
davidperk wants to merge 1 commit intojuanfranblanco:masterfrom
davidperk:syntax-highlighting

Conversation

@davidperk
Copy link

@davidperk davidperk commented Feb 5, 2026

Fixes #496

1. Fixes declaration-storage-mapping (L1115)

"end": "\\)"  // Changed from "(?=\\))" to actually consume the closing parenthesis

This allows nested mappings like mapping(address => mapping(uint256 => bool)) to work correctly.

2. Adds type-function pattern (L1137-1156)

New pattern to handle function type parameters like:

function(address, uint256) external callback

3. Updates declaration-function-parameters (L952, L955, L958)

Adds three includes to recognize mapping types in parameters, function types in parameters, and visibility modifiers (external, internal, etc.).

@davidperk
Copy link
Author

@juanfranblanco 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect param highlighting when params contain a mapping

1 participant