graphviz-2999.17.0.2: Bindings to Graphviz for graph visualisation.

Copyright(c) Ivan Lazar Miljenovic
License3-Clause BSD-style
MaintainerIvan.Miljenovic@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.GraphViz.PreProcessing

Description

"Real life" Dot code contains various items that are not directly parseable by this library. This module defines the preProcess function to remove these components, which include:

  • Comments (both /* ... */ style and // ... style);
    • Pre-processor lines (lines starting with a #);
    • Split lines (by inserting a \ the rest of that "line" is continued on the next line).
    • Strings concatenated together using "..." + "..."; these are concatenated into one big string.

Synopsis

Documentation

preProcess :: Text -> Text Source

Remove unparseable features of Dot, such as comments and multi-line strings (which are converted to single-line strings).