This moves around a bit of logic in
parseNewRecord.
While this has no impact, currently, this is because we are currently aborting as we get an error. Later, we'll be continuing the parsing, and need this to avoid a NullPointerException and an IndexOutOfBoundsException.
Additionally, this adds a warning for an oversight (should this instead be an error? Your call, I guess): We were not actually checking for commas between new record parameters.
That is, we were "checking for commas", but if we didn't see one, we were just... assuming... that we were in front of a ")" instead.
So... this allowed things such as this:
as the equivalent of
Code:
new rec(1, 2, 3, 4, 5, 6);
(notice the
very clear lack of commas).
This is... *cough*... not very... good, nor documented, let's say...
Currently, the "warning" (if we decide to leave it as such) is a simple
RequestLogger.printLine, but that's because warnings are not really fleshed out in Parser, currently. They will be later on.
P.s. we're almost done with that step. Only 6 more small patches like these before we're done with the initial logical reformatting, and can move on to adding the next two features: continuous parsing, and locations tracking: one in parseFunction, parseVariable, parseType, parseAggregateLiteral and parseReturn, and one that's a little sprinkled throughout Parser