UNPKG

@digitak/grubber

Version:

Parse code files and patch it without having to use an AST

24 lines (23 loc) 652 B
export default class default_1 { constructor() { this.rules = [ { // multi line string expression: /"""((?:.|\s)*?)[^\\](?:\\\\)*"""/, }, { // single quote string expression: /'.*?[^\\](?:\\\\)*'/, }, { // double quote string expression: /".*?[^\\](?:\\\\)*"/, }, { // comment expression: /#.*/, }, ]; } } default_1.importExpression = /^(?:(?:\bfrom +(.*?) +)?(\bimport) +(.*?)) *(?:\bas +(.*?))? *$/gm;