[njs] Fixed lexer->text state for the last token.

Dmitry Volyntsev xeioex at nginx.com
Wed Jan 30 15:56:39 UTC 2019


details:   https://hg.nginx.org/njs/rev/e136756f6bb2
branches:  
changeset: 744:e136756f6bb2
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Jan 30 18:48:23 2019 +0300
description:
Fixed lexer->text state for the last token.

diffstat:

 njs/njs_lexer.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r ea483ef4631a -r e136756f6bb2 njs/njs_lexer.c
--- a/njs/njs_lexer.c	Wed Jan 30 18:47:59 2019 +0300
+++ b/njs/njs_lexer.c	Wed Jan 30 18:48:23 2019 +0300
@@ -450,6 +450,8 @@ njs_lexer_next_token(njs_lexer_t *lexer)
         return njs_lexer_multi(lexer, token, n, multi);
     }
 
+    lexer->text.length = lexer->start - lexer->text.start;
+
     return NJS_TOKEN_END;
 }
 


More information about the nginx-devel mailing list