Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Visual Studio doesn't even do a full-blown AST - even though it has a full-blown internal parser. It frequently messes up auto-indenting when using macros involving blocks.

Lexing and producing tokens with a loop is probably enough given that auto-indentation works on a subset of states of the parser, if any. As my comment alluded to, using regex is harder to both write and read than a simple loop; it's also most likely slower.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: