Open aldy505 opened 3 years ago
Some regular expressions that are currently on the /src/language directory are somewhat inefficient.
/src/language
Take this as an example: https://github.com/teknologi-umum/flourite/blob/32bc6b7bbac2a2cc49fe42ac8412feec7f7500fc/src/languages/clojure.ts#L4-L7
That pattern might be optimized to/^\s*\(ns(\s+)(.*)(\))?$/ to minimize the steps needed to achieve the same result.
/^\s*\(ns(\s+)(.*)(\))?$/
I believe there are more patterns like that, that can be optimized.
Hi @aldy505 Would love to take the opportunity to work on this Thank you
@vijaykrishna536 yes go ahead
Some regular expressions that are currently on the
/src/language
directory are somewhat inefficient.Take this as an example: https://github.com/teknologi-umum/flourite/blob/32bc6b7bbac2a2cc49fe42ac8412feec7f7500fc/src/languages/clojure.ts#L4-L7
That pattern might be optimized to
/^\s*\(ns(\s+)(.*)(\))?$/
to minimize the steps needed to achieve the same result.I believe there are more patterns like that, that can be optimized.