nadavrot / layout

Layout is a rust library and a tool that renders Graphviz dot files.
MIT License
656 stars 39 forks source link

Infinite loop in lexer when reading a string #20

Closed xenon closed 9 months ago

xenon commented 9 months ago

When read_string is called in the lexer with an input such as digraph { a -> b; " } it will never terminate. This is because the while loop in read_string does not take into account EOF occuring before the string is closed. I've changed the lexer so that this no longer occurs and added a test to confirm that it is fixed.