@willbooster/tree-sitter-java 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grammar.js +9 -9
- package/package.json +1 -1
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
/// <reference types="tree-sitter-cli/dsl" />
|
|
10
10
|
// @ts-check
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const HEX_DIGITS = token(sep1(/[A-Fa-f0-9]+/,
|
|
12
|
+
const DECIMAL_DIGITS = token(sep1(/[0-9]+/, /_+/));
|
|
13
|
+
const DIGITS = token(choice('0', seq(/[1-9]/, optional(seq(optional(/_+/), DECIMAL_DIGITS)))));
|
|
14
|
+
const HEX_DIGITS = token(sep1(/[A-Fa-f0-9]+/, /_+/));
|
|
15
15
|
|
|
16
16
|
/* eslint-disable no-multi-spaces */
|
|
17
17
|
|
|
@@ -126,22 +126,22 @@ module.exports = grammar({
|
|
|
126
126
|
)),
|
|
127
127
|
|
|
128
128
|
octal_integer_literal: _ => token(seq(
|
|
129
|
-
choice('0o', '0O', '0'),
|
|
130
|
-
sep1(/[0-7]+/,
|
|
129
|
+
choice('0o', '0O', seq('0', optional(/_+/))),
|
|
130
|
+
sep1(/[0-7]+/, /_+/),
|
|
131
131
|
optional(choice('l', 'L')),
|
|
132
132
|
)),
|
|
133
133
|
|
|
134
134
|
binary_integer_literal: _ => token(seq(
|
|
135
135
|
choice('0b', '0B'),
|
|
136
|
-
sep1(/[01]+/,
|
|
136
|
+
sep1(/[01]+/, /_+/),
|
|
137
137
|
optional(choice('l', 'L')),
|
|
138
138
|
)),
|
|
139
139
|
|
|
140
140
|
decimal_floating_point_literal: _ => token(choice(
|
|
141
141
|
seq(DECIMAL_DIGITS, '.', optional(DECIMAL_DIGITS), optional(seq((/[eE]/), optional(choice('-', '+')), DECIMAL_DIGITS)), optional(/[fFdD]/)),
|
|
142
142
|
seq('.', DECIMAL_DIGITS, optional(seq((/[eE]/), optional(choice('-', '+')), DECIMAL_DIGITS)), optional(/[fFdD]/)),
|
|
143
|
-
seq(
|
|
144
|
-
seq(
|
|
143
|
+
seq(DECIMAL_DIGITS, /[eE]/, optional(choice('-', '+')), DECIMAL_DIGITS, optional(/[fFdD]/)),
|
|
144
|
+
seq(DECIMAL_DIGITS, optional(seq((/[eE]/), optional(choice('-', '+')), DECIMAL_DIGITS)), (/[fFdD]/)),
|
|
145
145
|
)),
|
|
146
146
|
|
|
147
147
|
hex_floating_point_literal: _ => token(seq(
|
|
@@ -153,7 +153,7 @@ module.exports = grammar({
|
|
|
153
153
|
optional(seq(
|
|
154
154
|
/[pP]/,
|
|
155
155
|
optional(choice('-', '+')),
|
|
156
|
-
|
|
156
|
+
DECIMAL_DIGITS,
|
|
157
157
|
optional(/[fFdD]/),
|
|
158
158
|
)),
|
|
159
159
|
)),
|
package/package.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|