Opened 3 years ago

Closed 2 years ago

#10276 closed bug (fixed)

ApiAnnotations : ITopenExpQuote needs SourceText

Reported by: alanz Owned by: alanz
Priority: normal Milestone: 8.0.1
Component: Compiler (Parser) Version: 7.10.1
Keywords: Cc: mpickering
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1479
Wiki Page:

Description

In the lexer, ITopenExpQuote can be recognised for '[e|' or '[|'.

The token definition needs to capture the original SourceText, and pass it through to ExpBr, which also needs a SrcText field.

Change History (6)

comment:1 Changed 3 years ago by alanz

Milestone: 7.10.27.12.1

There are only two options, both of which are well defined.

We can deal with this in ghc-exactprint by looking at the length of the annotated SrcSpan, so this ticket is not strictly necessary

comment:2 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:3 Changed 2 years ago by alanz

Differential Rev(s): Phab:D1479

comment:4 Changed 2 years ago by alanz

Status: newpatch

comment:5 Changed 2 years ago by Alan Zimmerman <alan.zimm@…>

In ee91482/ghc:

ApiAnnotations : ITopenExpQuote needs SourceText

Summary:
In the lexer, ITopenExpQuote can be recognised for '[e|' or '[|'.

The token definition needs to capture the original SourceText, and pass
it through to ExpBr, which also needs a SrcText field.

It is easier to simply add a flag  to the token identifying the variant
and to generate a different AnnKeywordId based on this.

Test Plan: ./validate

Reviewers: mpickering, bgamari, austin

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1479

GHC Trac Issues: #10276

comment:6 Changed 2 years ago by alanz

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.