Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line length feature #79

Open
MaxOstrowski opened this issue Sep 30, 2022 · 1 comment
Open

line length feature #79

MaxOstrowski opened this issue Sep 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@MaxOstrowski
Copy link
Member

It would be cool to have --line-length option to specify a maximum length of a line and avoid a linebreak after every used predicate.
A default of --line-length=0 would still produce the result as it is produced before but other output could be possible like:

% Check lower and upper bounds via "Sinz counter" on selected varying atoms
index(A, I) :- vary(A),
               I = #count { B : vary(B),
                                B <= A },
               not bounds(0, 0).

counter(I, 1) :- index(A, I), bounds(L, U),
                 L <= I, selected(A).

@sthiele sthiele added the enhancement New feature or request label Sep 30, 2022
@sthiele
Copy link
Member

sthiele commented Sep 30, 2022

I was thinking about something like that but had no time to finish it. See:

clingofmt/src/lib.rs

Lines 425 to 429 in 6470802

if state.in_termvec == 0 && !state.is_show
/*|| buf.len() >= MAX_LENGTH */
{
flush = true;
} else {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants