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

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: tbd_major
    • Component/s: tools
    • Labels:

      Description

      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.)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: