Skip to content

fix: a 3-D reference whose last sheet is TRUE or FALSE is not lexed as a reference - #60

Open
gthb wants to merge 1 commit into
borgar:masterfrom
gthb:lex-boolean-sheet-name-at-span-end
Open

fix: a 3-D reference whose last sheet is TRUE or FALSE is not lexed as a reference#60
gthb wants to merge 1 commit into
borgar:masterfrom
gthb:lex-boolean-sheet-name-at-span-end

Conversation

@gthb

@gthb gthb commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Lex Alpha:TRUE!A1 and Alpha:FALSE!A1 as one reference. They came out as a name, a colon, a boolean and a cell, so fixRanges left them as written, where Excel reads the 3-D reference over the sheets Alpha to TRUE and stores it quoted whole, 'Alpha:TRUE'!A1. parseA1Ref already read it that way; only the formula lexers disagreed.

lexBoolean no longer lexes TRUE or FALSE as a boolean when a colon precedes the word and a ! follows it, leaving it to the context lexer as the sheet name. TRUE!A1 with no colon before it is still a boolean, and TRUE:Gamma!A1 is still not a 3-D reference; Excel refuses both spellings.

Alpha:TRUE!A1 came out as a name, a colon, a boolean and a bare cell, so
no reference formed and fixRanges left it as written. Excel reads it as
the sheet range Alpha:TRUE and stores it quoted whole. parseA1Ref already
read the sheet range; only the formula lexers disagreed.

lexBoolean now yields to a following ! when a colon precedes the word.
Alone, TRUE!A1 is still a boolean, and TRUE:Gamma!A1 still no sheet
range; Excel refuses both spellings.
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.

1 participant