Skip to content

Commit

Permalink
Fix linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
gundermanc committed Nov 1, 2024
1 parent 2d195a0 commit 637ada1
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1996,12 +1996,12 @@ module.exports = grammar({
});

/**
* Creates a preprocessor regex rule
*
* @param {RegExp|Rule|String} command
*
* @return {AliasRule}
*/
* Creates a preprocessor regex rule
*
* @param {RegExp | Rule | string} command
*
* @returns {AliasRule}
*/
function preprocessor(command) {
return alias(new RegExp('#[ \t]*' + command), '#' + command);
}
Expand All @@ -2016,16 +2016,15 @@ function preprocessor(command) {
*
* @param {boolean} rep
*
* @return {RuleBuilders<string, string>}
* @returns {RuleBuilders<string, string>}
*/
function preprocIf(suffix, content, precedence = 0, rep = true) {
/**
*
* @param {GrammarSymbols<string>} $
*
* @return {ChoiceRule}
*
*/
*
* @param {GrammarSymbols<string>} $
*
* @returns {ChoiceRule}
*/
function alternativeBlock($) {
return choice(
suffix ? alias($['preproc_else' + suffix], $.preproc_else) : $.preproc_else,
Expand Down Expand Up @@ -2063,8 +2062,7 @@ function preprocIf(suffix, content, precedence = 0, rep = true) {
*
* @param {Rule} rule
*
* @return {SeqRule}
*
* @returns {SeqRule}
*/
function commaSep1(rule) {
return seq(rule, repeat(seq(',', rule)));
Expand All @@ -2075,8 +2073,7 @@ function commaSep1(rule) {
*
* @param {Rule} rule
*
* @return {SeqRule}
*
* @returns {SeqRule}
*/
function commaSep2(rule) {
return seq(rule, repeat1(seq(',', rule)));
Expand All @@ -2087,8 +2084,7 @@ function commaSep2(rule) {
*
* @param {Rule} rule
*
* @return {ChoiceRule}
*
* @returns {ChoiceRule}
*/
function commaSep(rule) {
return optional(commaSep1(rule));
Expand All @@ -2101,8 +2097,7 @@ function commaSep(rule) {
*
* @param {RuleOrLiteral} separator
*
* @return {SeqRule}
*
* @returns {SeqRule}
*/
function sep1(rule, separator) {
return seq(rule, repeat(seq(separator, rule)));
Expand All @@ -2115,8 +2110,7 @@ function sep1(rule, separator) {
*
* @param {RuleOrLiteral} separator
*
* @return {ChoiceRule}
*
* @returns {ChoiceRule}
*/
function sep(rule, separator) {
return optional(sep1(rule, separator));
Expand Down

0 comments on commit 637ada1

Please sign in to comment.