flourite
flourite copied to clipboard
Optimize the usage of regular expressions
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.