ejlilley / lilypond-parse

Haskell parser for Lilypond, using Parsec
Other
5 stars 1 forks source link

how should we handle \include ? #4

Open jwaldmann opened 4 years ago

jwaldmann commented 4 years ago

at some point, \include has to be followed/executed. In what phase? (#3)

  1. parse it (don't execute) as a normal command (1st phase), execute in 2nd phase
  2. or: execute in 1st phase (use https://hackage.haskell.org/package/parsec-3.1.14.0/docs/Text-Parsec.html#v:setInput)

I like 1. better. It would only work if lilypond guarantees that the included file is syntactically valid (balanced parentheses, etc.)