[PATCH] D99277: [AsmParser][SystemZ][z/OS] Add in support to accept "#" as part of an Identifier token

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 11:25:40 PDT 2021


nickdesaulniers added inline comments.


================
Comment at: llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp:98
-    // Lex initially to get the string.
-    Parser->getLexer().Lex();
   }
----------------
anirudhp wrote:
> nickdesaulniers wrote:
> > it's not clear to me how any of the changes to llvm/lib/ affect these changes to llvm/unittests/ in regards to explicitly calling `Lex`.
> My apologies. Could you expand a bit on your comment?
> 
> Afaik, we need the initial call to Lex to start the Lexer (to start getting the tokens one by one for later processing and checking). I could technically move it into the `lexAndCheckTokens` function before I run the loop, if that's what you mean?
> 
> But the way it was initially setup, I wanted to ensure the flag was set before the Lexer was run, and not during the checking phase, since at that point, the tokens are already Lexed, and we're merely checking, and I couldn't do that if it was encapsulated into a function that was run prior to the call to the setter.
Ah, sorry, I see now that the call to `Lex` was moved out of the setup code. Yeah that's fine.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99277/new/

https://reviews.llvm.org/D99277



More information about the llvm-commits mailing list