Skip to content

Commit 2785437

Browse files
committed
🚨 add lgtm explanation
1 parent 8c391e0 commit 2785437

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
@@ -8339,7 +8339,7 @@ class lexer : public lexer_base<BasicJsonType>
83398339
locale's decimal point is used instead of `.` to work with the
83408340
locale-dependent converters.
83418341
*/
8342-
token_type scan_number() // lgtm [cpp/use-of-goto]
8342+
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.
83438343
{
83448344
// reset token_buffer to store the number's bytes
83458345
reset();

0 commit comments

Comments
 (0)