Separator containing both layout and non-layout characters results in incorrect pretty printer (1)
In a Template Language file, if the
separator
attribute of a closure contains both layout and non-layout characters, the non-layout characters will be omitted in the generated pretty printer.For example, the Template Language fragment:
CrClause.CrClause = [[Expression][ClauseGuard] -> [Expression+; separator=",\n"] ]
results in correct SDF:
Expression ClauseGuard "->" {Expression ","}+ -> CrClause {cons("CrClause")}
but N incorrect pretty-printing rule:
prettyprint-CrClause = ?CrClause(a, b, c) ; ![ H( [SOpt(HS(), "0")] , [ <pp-one-Z(prettyprint-Expression)> a , <pp-one-Z(prettyprint-ClauseGuard)> b , S(" ->") ] ) , <pp-indent(|"6")> [<pp-V-list(prettyprint-Expression)> c] ]
e.g.
a -> b, c
parsed and unparsed results in
a -> b c
whereas the expected output is
a -> b, c
I’m using Spoofax 1.1.0.0-s33565.
Submitted by Barnabás Králik on 25 June 2013 at 09:10
Issue Log
On 13 July 2013 at 20:27 Gabriël Konat tagged sdf
On 13 July 2013 at 20:27 Gabriël Konat tagged minor
On 22 August 2013 at 03:40 Oskar van Rest tagged !oskarvanrest
On 22 August 2013 at 03:43 Oskar van Rest commented:
Note: this corresponds to the TODO at line 288 over here.
On 23 August 2013 at 06:52 Oskar van Rest commented:
On 23 August 2013 at 06:52 Oskar van Rest closed this issue.
On 28 July 2014 at 22:46 Gabriël Konat tagged 1.2
Log in to post comments