JavaScript parser: don't set token position information again and again
There is no need to set the token position information in the loop searching for the initial token character, simply do that when we finally found the token start.
This commit is contained in:
parent
772509e898
commit
be45924f7c
@ -370,11 +370,12 @@ getNextChar:
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
c = fileGetc ();
|
c = fileGetc ();
|
||||||
token->lineNumber = getSourceLineNumber ();
|
|
||||||
token->filePosition = getInputFilePosition ();
|
|
||||||
}
|
}
|
||||||
while (c == '\t' || c == ' ' || c == '\n');
|
while (c == '\t' || c == ' ' || c == '\n');
|
||||||
|
|
||||||
|
token->lineNumber = getSourceLineNumber ();
|
||||||
|
token->filePosition = getInputFilePosition ();
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case EOF: longjmp (Exception, (int)ExceptionEOF); break;
|
case EOF: longjmp (Exception, (int)ExceptionEOF); break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user