diff options
Diffstat (limited to 'json-glib/json-scanner.c')
-rw-r--r-- | json-glib/json-scanner.c | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/json-glib/json-scanner.c b/json-glib/json-scanner.c index e9a58be..73a510e 100644 --- a/json-glib/json-scanner.c +++ b/json-glib/json-scanner.c @@ -85,41 +85,42 @@ struct _JsonScannerConfig static JsonScannerConfig json_scanner_config_template = { - ( " \t\r\n" ) /* cset_skip_characters */, - ( - "_" - G_CSET_a_2_z - G_CSET_A_2_Z - ) /* cset_identifier_first */, - ( - G_CSET_DIGITS - "-_" - G_CSET_a_2_z - G_CSET_A_2_Z - ) /* cset_identifier_nth */, - ( "//\n" ) /* cpair_comment_single */, - TRUE /* case_sensitive */, - TRUE /* skip_comment_multi */, - TRUE /* skip_comment_single */, - FALSE /* scan_comment_multi */, - TRUE /* scan_identifier */, - TRUE /* scan_identifier_1char */, - FALSE /* scan_identifier_NULL */, - TRUE /* scan_symbols */, - TRUE /* scan_binary */, - TRUE /* scan_octal */, - TRUE /* scan_float */, - TRUE /* scan_hex */, - TRUE /* scan_hex_dollar */, - TRUE /* scan_string_sq */, - TRUE /* scan_string_dq */, - TRUE /* numbers_2_int */, - FALSE /* int_2_float */, - FALSE /* identifier_2_string */, - TRUE /* char_2_token */, - TRUE /* symbol_2_token */, - FALSE /* scope_0_fallback */, - TRUE /* store_int64 */ + .cset_skip_characters = ( " \t\r\n" ), + .cset_identifier_first = ( + "_" + G_CSET_a_2_z + G_CSET_A_2_Z + ), + .cset_identifier_nth = ( + G_CSET_DIGITS + "-_" + G_CSET_a_2_z + G_CSET_A_2_Z + ), + .cpair_comment_single = ( "//\n" ), + .case_sensitive = TRUE, + .skip_comment_multi = TRUE, + .skip_comment_single = TRUE, + .scan_comment_multi = FALSE, + .scan_identifier = TRUE, + .scan_identifier_1char = TRUE, + .scan_identifier_NULL = FALSE, + .scan_symbols = TRUE, + .scan_binary = TRUE, + .scan_octal = TRUE, + .scan_float = TRUE, + .scan_hex = TRUE, + .scan_hex_dollar = TRUE, + .scan_string_sq = TRUE, + .scan_string_dq = TRUE, + .numbers_2_int = TRUE, + .int_2_float = FALSE, + .identifier_2_string = FALSE, + .char_2_token = TRUE, + .symbol_2_token = TRUE, + .scope_0_fallback = FALSE, + .store_int64 = TRUE, + .padding_dummy = 0, }; /* --- defines --- */ @@ -282,8 +283,8 @@ json_scanner_free_value (GTokenType *token_p, static void json_scanner_destroy_symbol_table_entry (gpointer _key, - gpointer _value, - gpointer _data) + gpointer _value G_GNUC_UNUSED, + gpointer _data G_GNUC_UNUSED) { JsonScannerKey *key = _key; |