Skip to content

fixes #2714 but needs to be thoroughly tested#2716

Closed
jurgenvinju wants to merge 146 commits intomainfrom
fix/issue-2714
Closed

fixes #2714 but needs to be thoroughly tested#2716
jurgenvinju wants to merge 146 commits intomainfrom
fix/issue-2714

Conversation

@jurgenvinju
Copy link
Member

  • a Rascal formatter setup
  • make sure around empty boxes no additional spacing is added
  • removed dead var
  • progress on a rascal formatter
  • removed dead doc comment
  • minor progress on rascal formatter
  • convenience for separated lists
  • improving the formatter
  • more additions to the formatter
  • renamed test to a unique name
  • added lots of new formatting rules for Rascal
  • some deforestation makes the algorithm much faster
  • added missing group function (ported from Set)
  • factored expensive constant to private global
  • more constructs are formatted now and we group statements if they were grouped before
  • added lots of formatting rules
  • prevent generation of empty literals, replace by NULL where neceessary
  • fixed an issue and added some debug code
  • added assert for empty literals
  • minor fixes
  • fixed unused warning
  • fixed some unused imports and removed unused function
  • replaced the complex and broken GG feature of Box2Text by an eager rewrite rule that only implements grouping of Boxes and nothing else. Also changed the implementation of table row filling by filling with SPACE(1) now instead of H([]) because H([]) boxes dissappear before they can fill the row
  • continued with adding more formatting rules
  • added rs for rowSeparator feature to Arrays, for when we want to display separated lists of tuples (for example) as aligned columns
  • tables fixed for the occurence of nested splices. This involves inferring l() alignment for colums that appear through splicing. This is very handy if you want to format generic tables where you don't know the number of tuples elements as a language engineer beforehand
  • separated lists do not have space by default between the previous element and the separator
  • removed unused pattern variable
  • added more formatting rules. needed fixes in Box2Text
  • streamlining
  • some progress with string termplate formatting
  • added todo
  • turned prefix of ' continuation into a layout node to make sure layoutDiff does not complain if we change the indentation depth
  • re-introduced striprec which has disappeared from Type during a cleanup
  • gave constructor names to StringLiteral alternatives for easy API
  • added plausably correct formatting of string templates with left-aligned continuations, even though the continuation characters can be deeply nested in conditional control flow
  • slices
  • better callOrTree indentation
  • inlined G semantics again to be able to deal with nested U boxes properly
  • started formatting syntax definitions
  • fixes in G boxes with H contexts
  • added todo
  • added and used toClusterBox function for retaining vertical clusters that have meaning to the programmer
  • add clustering to function statements
  • AG is now also inlined and lazily evaluated to allow for U and G groups to be resolved before the groupBy is done on the nested list
  • improved relation tables
  • added debUG function for debugging G U and AG groups
  • fixed Main again
  • added more constructs to format
  • all binary expressions are now lists by tree2box
  • added backward grouping
  • added backward option to G groups
  • added backwards grouping to debUG
  • single line comments that have to end with a newline now end with a new line again
  • expression elements wrapped in HV because they can become lists now due to the flattener
  • single line comments fixed
  • incremental additions to the Rascal formatter'
  • incremental additions to the Rascal formatter'
  • better empty sets
  • fixed tricky issues with single line comments in layoutDiff
  • much better solution for single line comments that end up formatted in between two elements
  • finetuning
  • radical optimization due to caching symbol for newline character class
  • conditional debug prints get special treatment
  • added asserts to formatter
  • less leading space for indented data declaration variants
  • much better indentation for assignments and declarations with initial expressions
  • fix for non-single-line comments that do not need forced newlines, but also not the last forced newline removed
  • removed test comments
  • inlined the hot width function (alias for string size)
  • factored constant to a global for efficiency sake
  • introduced varargs versions of all boxes and renamed the respective boxes to _H, _V, etc. to avoid infinite recursions. This allows for removal of 50% of the brackets in Box expressions.
  • lot of finetuning and removing little issues
  • removed all superfluous brackets using the cleanMeUp function
  • fixed issues caused by rough cleanup
  • more fixes
  • fixed multi-variable declarations
  • fixed additional statements in for loops inside string templates
  • fixed return of binary expressions
  • added some more sanity checks, also for documentation purposes
  • removed the superfluous brackets from the Box2Text test cases, for documentation purposes
  • test renamings
  • removed more superfluous brackets
  • moving ahead with testing all files in the library automatically
  • some bugs
  • fixed an 11-year-old search/replace bug in the C grammar
  • still fixing fall out of changin the default formatter for binary expressions
  • checker found another undeclared constructor
  • restored relations-as-tables
  • single expressions end up in the first cell
  • incremental improvements
  • while and do-while in templates forgotten
  • formatted two files from the standard library
  • spacing in signatures fixed
  • optimized executeTextEdits from quadratic to linear algorithm
  • fixed issues with reals that start with a dot
  • fixed if-then-else formatter
  • fixed rewrite-rule semi-colon attachment
  • fixed common keyword param spacing
  • fixed default bracket syntax
  • not flatten the non-associative comparison operators
  • fixing details
  • improved lists and sets of tuples
  • improved lists and sets of tuples also for patterns
  • added pattern-replacement-with-when case
  • rewrote core box constructors from X to X to avoid issue with type checker Can't start constructor names with an underscore #2493
  • made intercalate and intersperse faster
  • fixed typo in docs
  • fixed function parameter layout
  • radical optimization for large table layouts
  • fixed util::Highlight still based on old highlighting categories #2512
  • debugging
  • variable becomes formatted
  • added missing import
  • added special cases for function calls with a closure as the final parameters, with and without keyword parameters and without after that and without and without normal parameters before that
  • adding special case for closure definition
  • definitions of functions that return a closure streamlined and the closing bracket always on its own line if a call is Verticalized by HOV
  • details in function declarations and funny corner cases
  • added module with formatter generators (constructs the safe pipelines of Box producers and consumers until a diff can be produced with layoutDiff
  • fixed type error
  • generalized debugging formatter features from Rascal examples
  • removed duplicate confusing implementation of toHTML
  • perfecting debugging tools
  • details
  • removed non-working linenumbers from toHTML
  • fixed some documentation issues
  • fixing minor issues and added delabel utility to ParseTree
  • tutor errors as warnings to make sure we test everything on this PR.
  • Revert "removed RuntimeException rethrow around initializing a module, and removed setInitialized(false) for it. In the current setup a module is initialized with and without having detected errors. This fixes false extend/import cycle detected #2714, but needs to be thoroughly tested"
  • Reapply "removed RuntimeException rethrow around initializing a module, and removed setInitialized(false) for it. In the current setup a module is initialized with and without having detected errors. This fixes false extend/import cycle detected #2714, but needs to be thoroughly tested"

…write rule that _only_ implements grouping of Boxes and nothing else. Also changed the implementation of table row filling by filling with SPACE(1) now instead of H([]) because H([]) boxes dissappear before they can fill the row
…lay separated lists of tuples (for example) as aligned columns
…rameters, with and without keyword parameters and without after that and without and without normal parameters before that
…osing bracket always on its own line if a call is Verticalized by HOV
… of Box producers and consumers until a diff can be produced with layoutDiff
…, and removed setInitialized(false) for it. In the current setup a module is initialized with and without having detected errors. This fixes #2714, but needs to be thoroughly tested"

This reverts commit 98c8a1d.
…e, and removed setInitialized(false) for it. In the current setup a module is initialized with and without having detected errors. This fixes #2714, but needs to be thoroughly tested"

This reverts commit b9b400f.
@jurgenvinju
Copy link
Member Author

This is the wrong branch

@jurgenvinju jurgenvinju deleted the fix/issue-2714 branch March 16, 2026 12:46
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

false extend/import cycle detected util::Highlight still based on old highlighting categories

1 participant