Roald87 / TcBlack

Opnionated code formatter for TwinCAT.
MIT License
105 stars 10 forks source link

Replace complex regex in Tokenize #55

Open Roald87 opened 3 years ago

Roald87 commented 3 years ago

Currently the VariableDeclaration.Tokenize() method in TcBlackCore has quite a complex regular expression to separate all the different components. For example to close #35 a two step regex was needed. It might be a better idea to replace the regex with a a finite state machine as also discussed here. Example of finite state machine.