Skip to content

Commit

Permalink
fix: CI lint
Browse files Browse the repository at this point in the history
  • Loading branch information
asharkhan3101 committed Oct 24, 2024
1 parent bda23e3 commit d78fa0c
Show file tree
Hide file tree
Showing 4 changed files with 1,238 additions and 16 deletions.
5 changes: 5 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import treesitter from 'eslint-config-treesitter';

export default [
...treesitter,
];
36 changes: 20 additions & 16 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
// @ts-check

const
letter = /[a-zA-Z]/,
decimal_digit = /[0-9]/,
octal_digit = /[0-7]/,
hex_digit = /[0-9A-Fa-f]/
letter = /[a-zA-Z]/;
const decimal_digit = /[0-9]/;
const octal_digit = /[0-7]/;
const hex_digit = /[0-9A-Fa-f]/;

/**
*
* @param {any} content
*/
function array_of(content) {
return seq(
'[',
Expand Down Expand Up @@ -500,20 +504,20 @@ module.exports = grammar({
'"',
repeat(choice(
token.immediate(prec(1, /[^"\\]+/)),
$.escape_sequence
$.escape_sequence,
)),
'"'
'"',
),

seq(
"'",
'\'',
repeat(choice(
token.immediate(prec(1, /[^'\\]+/)),
$.escape_sequence
$.escape_sequence,
)),
"'",
'\'',
),
)
),
),

escape_sequence: $ => token.immediate(seq(
Expand All @@ -523,17 +527,17 @@ module.exports = grammar({
/\d{2,3}/,
/x[0-9a-fA-F]{2,}/,
/u[0-9a-fA-F]{4}/,
/U[0-9a-fA-F]{8}/
)
/U[0-9a-fA-F]{8}/,
),
)),

comment: $ => token(choice(
seq('//', /.*/),
seq(
'/*',
/[^*]*\*+([^/*][^*]*\*+)*/,
'/'
)
))
}
'/',
),
)),
},
});
Loading

0 comments on commit d78fa0c

Please sign in to comment.