How to use the oniguruma.OnigScanner function in oniguruma

To help you get started, we’ve selected a few oniguruma 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 jeff-hykin / cpp-textmate-grammar / test / source / report / onig_scanner.js View on Github external
constructor(patterns, recorder) {
        this.onigScanner = new oniguruma.OnigScanner(patterns);
        this.regexps = patterns.map(
            pattern => new oniguruma.OnigRegExp(pattern)
        );
        this.patterns = patterns;
        this.recorder = recorder;
    }
    /**
github atom / first-mate / src / scanner.js View on Github external
createScanner (firstLine, position, anchorPosition) {
    const patterns = this.patterns.map(pattern => pattern.getRegex(firstLine, position, anchorPosition))
    return new OnigScanner(patterns)
  }