How to use the snapdragon.Parser function in snapdragon

To help you get started, we’ve selected a few snapdragon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github micromatch / extglob / lib / parser.js View on Github external
function extglobParser(options) {
  var parser = new snapdragon.Parser(extend({}, options));

  function set(name, re) {
    parser.set(name, function() {
      var pos = this.position();
      var m = this.match(re);
      if (!m) return;
      var inside = {
        braces: this.isInside('braces'),
        brackets: this.isInside('brackets'),
        parens: this.isInside('parens')
      inside.any = (inside.braces || inside.brackets || inside.parens);
      if (name === 'globstar') {
        this.pattern.hasGlobstar = true;


Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.

Latest version published 2 years ago

Package Health Score

71 / 100
Full package analysis