6
6
typedef struct {
7
7
stb_lexer l ;
8
8
const char * path ;
9
- const char * key ;
9
+ const char * member ;
10
10
} Jimp ;
11
11
12
12
bool jimp_bool (Jimp * jimp , bool * boolean );
@@ -97,7 +97,7 @@ void jimp_unknown_member(Jimp *jimp)
97
97
{
98
98
stb_lex_location loc = {0 };
99
99
stb_c_lexer_get_location (& jimp -> l , jimp -> l .where_firstchar , & loc );
100
- fprintf (stderr , "%s:%d:%d: ERROR: Unexpected member `%s`\n" , jimp -> path , loc .line_number , loc .line_offset + 1 , jimp -> key );
100
+ fprintf (stderr , "%s:%d:%d: ERROR: Unexpected member `%s`\n" , jimp -> path , loc .line_number , loc .line_offset + 1 , jimp -> member );
101
101
}
102
102
103
103
bool jimp_object_begin (Jimp * jimp )
@@ -111,7 +111,7 @@ bool jimp_object_member(Jimp *jimp)
111
111
if (!stb_c_lexer_get_token (& jimp -> l )) return false;
112
112
if (jimp -> l .token == ',' ) {
113
113
if (!jimp_get_and_expect_token (jimp , CLEX_dqstring )) return false;
114
- jimp -> key = strdup (jimp -> l .string ); // TODO: memory leak
114
+ jimp -> member = strdup (jimp -> l .string ); // TODO: memory leak
115
115
if (!jimp_get_and_expect_token (jimp , ':' )) return false;
116
116
return true;
117
117
}
@@ -120,7 +120,7 @@ bool jimp_object_member(Jimp *jimp)
120
120
return false;
121
121
}
122
122
if (!jimp_expect_token (jimp , CLEX_dqstring )) return false;
123
- jimp -> key = strdup (jimp -> l .string ); // TODO: memory leak
123
+ jimp -> member = strdup (jimp -> l .string ); // TODO: memory leak
124
124
if (!jimp_get_and_expect_token (jimp , ':' )) return false;
125
125
return true;
126
126
}
0 commit comments