nadavrot / layout

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

Infinite loop in lexer when reading a string #20

Closed xenon closed 4 months ago

xenon commented 4 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.