| Author | Dave Jarvis <email> |
|---|---|
| Date | 2021-06-17 08:00:14 GMT-0700 |
| Commit | 35eee5b5918dd63d90eb686ddbb884b28acf9b78 |
| Parent | a2fe599 |
| public enum LexemeType { | ||
| QUOTE_SINGLE, | ||
| + QUOTE_SINGLE_OPENING, | ||
| + QUOTE_SINGLE_CLOSING, | ||
| QUOTE_DOUBLE, | ||
| ESC_SINGLE, |
| lexeme = createLexeme( QUOTE_DOUBLE, began, i.getIndex() ); | ||
| } | ||
| + else if( curr == '‘') { | ||
| + lexeme = createLexeme( QUOTE_SINGLE_OPENING, began, i.getIndex() ); | ||
| + } | ||
| + else if( curr == '’') { | ||
| + lexeme = createLexeme( QUOTE_SINGLE_CLOSING, began, i.getIndex() ); | ||
| + } | ||
| else if( curr == '-' && peek( i ) == '-' || curr == '—' ) { | ||
| slurp( i, ( next, ci ) -> next == '-' || next == '—' ); |
| */ | ||
| private static final LexemeType[] LAGGING_QUOTE_OPENING_DOUBLE = | ||
| - new LexemeType[]{WORD, NUMBER, ELLIPSIS, QUOTE_SINGLE, QUOTE_DOUBLE}; | ||
| + new LexemeType[]{WORD, NUMBER, ELLIPSIS, | ||
| + QUOTE_SINGLE, QUOTE_SINGLE_OPENING, QUOTE_SINGLE_CLOSING, QUOTE_DOUBLE}; | ||
| /** | ||
| * Double quotes preceded by these {@link LexemeType}s may be closing quotes. | ||
| */ | ||
| private static final LexemeType[] LEADING_QUOTE_CLOSING_DOUBLE = | ||
| - new LexemeType[]{WORD, NUMBER, PERIOD, PUNCT, DASH, ELLIPSIS, QUOTE_SINGLE}; | ||
| + new LexemeType[]{WORD, NUMBER, PERIOD, PUNCT, DASH, ELLIPSIS, | ||
| + QUOTE_SINGLE, QUOTE_SINGLE_CLOSING, QUOTE_SINGLE_OPENING}; | ||
| /** |
| shouldn't drop letters, nor say “ain't” or “hain't.” | ||
| -#"’Kearney lives on the banks of Killarney—’ | ||
| -#“’Kearney lives on the banks of Killarney—’ | ||
| +"’Kearney lives on the banks of Killarney—’ | ||
| +“’Kearney lives on the banks of Killarney—’ | ||
| # ######################################################################## |
| Delta | 14 lines added, 4 lines removed, 10-line increase |
|---|