Skip to content

Commit

Permalink
Simplify _hex_literal at the advice of tree-sitter generate (#138)
Browse files Browse the repository at this point in the history
* Simplify `_hex_literal` at the advice of `tree-sitter generate`

* CHANGELOG bullet
  • Loading branch information
DavisVaughan authored Sep 6, 2024
1 parent bc2cb4b commit c8b6e5f
Show file tree
Hide file tree
Showing 4 changed files with 79,558 additions and 80,381 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## devel

- The internal `_hex_literal` rule was simplified slightly (#138).

## 1.1.0

- Switched to using `tree-sitter-language` in the Rust bindings to remove a dependency on a specific `tree-sitter` crate version (#133).
Expand Down
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ module.exports = grammar({
complex: $ => seq($._float_literal, "i"),
float: $ => $._float_literal,

_hex_literal: $ => seq(/0[xX][0-9a-fA-F]+/),
_hex_literal: $ => /0[xX][0-9a-fA-F]+/,
_number_literal: $ => /(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:[eE][+-]?\d*)?/,
_float_literal: $ => choice($._hex_literal, $._number_literal),

Expand Down
9 changes: 2 additions & 7 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c8b6e5f

Please sign in to comment.