Skip to content

Error when an Identifier is being broken up by buffer ending #3

@whc2001

Description

@whc2001

I believe this is actually a continuation of #1, but since it's closed and I don't seem to have a way to reopen it, I'll open up a new issue.

Seems like there is still some problem with the buffering mechanism. When there is an identifier being broken up by buffer ending, it would be read as two separate identifiers causing error.

image

image

image

After investigating seems like I missed something the last time. If I comprehend correctly, EnsureBuffer(len) should return true when there is actually len chars to read (those many of chars can be ensured, like the method name), and false if no further chars are available. However at line 242:

var charsRead = Reader.ReadBlock(buffer, bufferLength, charsNeeded);
bufferLength += charsRead;
if (charsRead < charsNeeded)
{
readerEof = true;
return false;
}
return false;
}

After the if on line 237, a successful state can be assured (there is more char to read). So looks like it should return true instead. I tested locally with the file that I need to parse and seems like it's working.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions