[PATCH] YAML: Implement block scalar parsing

Alex L arphaman at gmail.com
Wed May 6 15:08:02 PDT 2015


2015-05-06 15:00 GMT-07:00 Duncan P. N. Exon Smith <dexonsmith at apple.com>:

>
> > On 2015 May 6, at 17:57, Alex L <arphaman at gmail.com> wrote:
> >
> >
> > > +  Current = skip_while(&Scanner::skip_s_white, Current);
> > > +  skipComment();
> >
> > These two lines are both part of `scanToNextToken()`.  I wonder if you
> > picked the right thing to extract?
> >
> > I'm not sure what you mean by this. 'skipComment' is used here as well
> > as in 'scanToNextToken', but the rest is different.
>
> This:
>
>     Current = skip_while(&Scanner::skip_s_white, Current)
>
> looks equivalent to the code just prior to `skipComment()` in
> `scanToNextToken()`.
>

It is basically equivalent, but I don't see the issue here. I think
that the 'skipComment' method should just skip the comment
if it's present at the current position and if the callers want
to skip whitespace before it they can. I think the code
benefits from such a distinction.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150506/c32da513/attachment.html>


More information about the llvm-commits mailing list