Skip to content

Commit

Permalink
Allow .end to be unbalanced (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachallaun authored Jul 26, 2024
1 parent 98e9fa2 commit 8f2f031
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
nodejs 20.11.1
erlang 24.3.4.13
elixir 1.13.4-otp-24
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [Unreleased]

### Fixed

- Fixed an issue with `do`/`end` and `fn`/`end` brackets where `end` would
mistakenly be considered a closing bracket when used as a map or struct field.

## [0.0.17]

### Added
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"scopeName": "source.elixir",
"path": "./syntaxes/elixir.json",
"unbalancedBracketScopes": [
"constant.language.symbol.elixir"
"constant.language.symbol.elixir",
"entity.name.map-access.elixir"
]
},
{
Expand Down
12 changes: 12 additions & 0 deletions syntaxes/elixir.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@
}
}
},
{
"comment": "Qualified map access without parenthesis",
"match": "\\s*(\\.)\\s*([a-z_]\\w*[!?]?)",
"captures": {
"1": {
"name": "punctuation.separator.method.elixir"
},
"2": {
"name": "entity.name.map-access.elixir"
}
}
},
{
"comment": "Erlang Function call without parenthesis",
"match": "(\\:\\w+)\\s*(\\.)\\s*([_]?\\w*[!?]?)",
Expand Down

0 comments on commit 8f2f031

Please sign in to comment.