import { DefaultNameRegexp } from "./lib-utils-cst-utils.js";
import { isCommentTerminal, terminalRegex } from "./lib-utils-grammar-utils.js";
import { isMultilineComment } from "./lib-utils-regexp-utils.js";
import { isTerminalRule } from "./lib-languages-generated-ast.js";
function createGrammarConfig(services) {
  const rules = [];
  const grammar = services.Grammar;
  for (const rule of grammar.rules) {
    if (isTerminalRule(rule) && isCommentTerminal(rule) && isMultilineComment(terminalRegex(rule))) {
      rules.push(rule.name);
    }
  }
  return {
    multilineCommentRules: rules,
    nameRegexp: DefaultNameRegexp
  };
}
export {
  createGrammarConfig
};
//# sourceMappingURL=lib-languages-grammar-config.js.map
