Parsing line noise as JavaScript

from blog marijnhaverbeke.nl/blog, | ↗ original
I am writing a tool that tries to enhance a JavaScript code editor by doing some halfway serious static analysis on code, as it is being written. To analyze code, you'll want to parse it, because—believe me—running casual regexps over programs in order to determine their structure is not a healthy direction to go in. But unfortunately, code...