-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to pretty printing of terms.
* This changes the `atomic` boolean parameter to a `prec` integer parameter specifying the precedence of the surrounding context. * We also change how some things are printed: - a lot fewer parens, based on precedence - suffix of numeric literals is separated by `'` (see also #337) - pointers are printed in base 16 - use `NULL` instead of `null` to match CN's input notation - custom printing for negated comparisons `x != y` instead of `!(x == y)` - use `%` instead of `rem` - use `^` instead of `xor_uf` - use `&` instead of `bw_and_uf` - use `|` instead of `bw_or_uf` - use `<<` instead of `shift_left` - use `>>` instead of `shift_right` - use `{ ...s, x = e }` for updating things. This is borrowed from JavaScript but it makes the precedence story simpler. - use `&p->x` instead of `member_shift<T>(p,x)` - use `&p[x]` instead of `array_shift<T>(p,x)` - use `cons(x,xs)` instead of `x :: xs`
- Loading branch information
Showing
4 changed files
with
142 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters