Skip to content

Commit 4a602df

Browse files
authored
Add lgtm explanation (#4362)
1 parent 18ff442 commit 4a602df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/nlohmann/detail/input/lexer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ class lexer : public lexer_base<BasicJsonType>
967967
locale's decimal point is used instead of `.` to work with the
968968
locale-dependent converters.
969969
*/
970-
token_type scan_number() // lgtm [cpp/use-of-goto]
970+
token_type scan_number() // lgtm [cpp/use-of-goto] `goto` is used in this function to implement the number-parsing state machine described above. By design, any finite input will eventually reach the "done" state or return token_type::parse_error. In each intermediate state, 1 byte of the input is appended to the token_buffer vector, and only the already initialized variables token_buffer, number_type, and error_message are manipulated.
971971
{
972972
// reset token_buffer to store the number's bytes
973973
reset();

single_include/nlohmann/json.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8340,7 +8340,7 @@ class lexer : public lexer_base<BasicJsonType>
83408340
locale's decimal point is used instead of `.` to work with the
83418341
locale-dependent converters.
83428342
*/
8343-
token_type scan_number() // lgtm [cpp/use-of-goto]
8343+
token_type scan_number() // lgtm [cpp/use-of-goto] `goto` is used in this function to implement the number-parsing state machine described above. By design, any finite input will eventually reach the "done" state or return token_type::parse_error. In each intermediate state, 1 byte of the input is appended to the token_buffer vector, and only the already initialized variables token_buffer, number_type, and error_message are manipulated.
83448344
{
83458345
// reset token_buffer to store the number's bytes
83468346
reset();

0 commit comments

Comments
 (0)