Closed ludanpr closed 2 years ago
Looks on the right track to me @ludanpr .
Got it @ltcmelo , thanks for the feedback. I'm gonna work on them.
While working on this PR, I stumbled across on what appears to be a small bug. With the (additional) test case:
void ParserTest::case1093()
{
parseExpression(".1f",
Expectation().AST( { FloatingConstantExpression }));
}
it fails:
-------------------------------------------------
PARSER-case1093... mismatch in ERROR count
! FAIL
Expected: 0
Actual : 1
/home/luan/Documentos/psychec/C/tests/Test.cpp:97
-------------------------------------------------
on
Author: Leandro T. C. Melo <ltcmelo@gmail.com>
Date: Fri May 20 20:24:52 2022 -0300
(initial) type binding and tests (#102)
which was tracked to:
@ludanpr thanks for the but discovery/report!
I just pushed a fix to it.
It could be that my fix requires you to do some adjustments in your PR, sorry for that. But it could also be that my fix gives you additional insight on my previous comments about avoiding the lexer to "look backwards".
I was indeed taking the approach you suggested. Thank you :+1:
Thanks @ludanpr for the good work 🙂
I just merged the PR (I will just make a minor adjustment a method of lexer later).
Implement support for imaginary constants, mentioned at PR #86 . I'm opening it as a draft for you to take a look. In particular, the changes to
Lexer::lexIntegerOrFloatingConstant
and the (possible) additionalLexer::DiagnosticsReporter::