Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8182538 javac technical debt umbrella task
  3. JDK-8024098

javac syntax tree should more closely model the source code

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • tools

      Currently, some desugaring is done early, in the parser (e.g. enum constants) and MemberEnter (e.g. default constructors, super calls).

      It would be better if the tree more closely modeled the source text (up until TransTypes and Lower). This will mean adding more tree nodes. The desugaring done today should effectively be done while creating the internal semantic data structures.

      A nice goal/test would be to be able to take a source file, run it through parse() and analyze(), write out the tree, and get the same sequence of tokens found in the original file (i.e. ignoring changes in whitespace and comments.)

            jlahoda Jan Lahoda
            jjg Jonathan Gibbons
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: