Libcroco
cr-token.c
Go to the documentation of this file.
1 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
2 
3 /*
4  * This file is part of The Croco Library
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of version 2.1 of the GNU Lesser General Public
8  * License as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA
19  *
20  * Author: Dodji Seketeli
21  * see COPYRIGHTS file for copyright information.
22  */
23 
24 /**
25  *@file
26  *The definition of the #CRToken class.
27  *Abstracts a css2 token.
28  */
29 #include <string.h>
30 #include "cr-token.h"
31 
32 /*
33  *TODO: write a CRToken::to_string() method.
34  */
35 
36 /**
37  *Frees the attributes of the current instance
38  *of #CRtoken.
39  *@param a_this the current instance of #CRToken.
40  */
41 static void
42 cr_token_clear (CRToken * a_this)
43 {
44  g_return_if_fail (a_this);
45 
46  switch (a_this->type) {
47  case S_TK:
48  case CDO_TK:
49  case CDC_TK:
50  case INCLUDES_TK:
51  case DASHMATCH_TK:
52  case PAGE_SYM_TK:
53  case MEDIA_SYM_TK:
54  case FONT_FACE_SYM_TK:
55  case CHARSET_SYM_TK:
56  case IMPORT_SYM_TK:
57  case IMPORTANT_SYM_TK:
58  case SEMICOLON_TK:
59  case NO_TK:
60  case DELIM_TK:
61  case CBO_TK:
62  case CBC_TK:
63  case BO_TK:
64  case BC_TK:
65  break;
66 
67  case STRING_TK:
68  case IDENT_TK:
69  case HASH_TK:
70  case URI_TK:
71  case FUNCTION_TK:
72  case COMMENT_TK:
73  case ATKEYWORD_TK:
74  if (a_this->u.str) {
75  cr_string_destroy (a_this->u.str);
76  a_this->u.str = NULL;
77  }
78  break;
79 
80  case EMS_TK:
81  case EXS_TK:
82  case LENGTH_TK:
83  case ANGLE_TK:
84  case TIME_TK:
85  case FREQ_TK:
86  case PERCENTAGE_TK:
87  case NUMBER_TK:
88  case PO_TK:
89  case PC_TK:
90  if (a_this->u.num) {
91  cr_num_destroy (a_this->u.num);
92  a_this->u.num = NULL;
93  }
94  break;
95 
96  case DIMEN_TK:
97  if (a_this->u.num) {
98  cr_num_destroy (a_this->u.num);
99  a_this->u.num = NULL;
100  }
101 
102  if (a_this->dimen) {
103  cr_string_destroy (a_this->dimen);
104  a_this->dimen = NULL;
105  }
106 
107  break;
108 
109  case RGB_TK:
110  if (a_this->u.rgb) {
111  cr_rgb_destroy (a_this->u.rgb) ;
112  a_this->u.rgb = NULL ;
113  }
114  break ;
115 
116  case UNICODERANGE_TK:
117  /*not supported yet. */
118  break;
119 
120  default:
121  cr_utils_trace_info ("I don't know how to clear this token\n") ;
122  break;
123  }
124 
125  a_this->type = NO_TK;
126 }
127 
128 /**
129  *Default constructor of
130  *the #CRToken class.
131  *@return the newly built instance of #CRToken.
132  */
133 CRToken *
135 {
136  CRToken *result = NULL;
137 
138  result = g_try_malloc (sizeof (CRToken));
139 
140  if (result == NULL) {
141  cr_utils_trace_info ("Out of memory");
142  return NULL;
143  }
144 
145  memset (result, 0, sizeof (CRToken));
146 
147  return result;
148 }
149 
150 /**
151  *Sets the type of curren instance of
152  *#CRToken to 'S_TK' (S in the css2 spec)
153  *@param a_this the current instance of #CRToken.
154  *@return CR_OK upon successfull completion, an error
155  *code otherwise.
156  */
157 enum CRStatus
159 {
160  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
161 
162  cr_token_clear (a_this);
163 
164  a_this->type = S_TK;
165 
166  return CR_OK;
167 }
168 
169 /**
170  *Sets the type of the current instance of
171  *#CRToken to 'CDO_TK' (CDO as said by the css2 spec)
172  *@param a_this the current instance of #CRToken.
173  *@return CR_OK upon successfull completion, an error
174  *code otherwise.
175  */
176 enum CRStatus
178 {
179  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
180 
181  cr_token_clear (a_this);
182 
183  a_this->type = CDO_TK;
184 
185  return CR_OK;
186 }
187 
188 /**
189  *Sets the type of the current token to
190  *CDC_TK (CDC as said by the css2 spec).
191  *@param a_this the current instance of #CRToken.
192  *@return CR_OK upon successfull completion, an error
193  *code otherwise.
194  */
195 enum CRStatus
197 {
198  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
199 
200  cr_token_clear (a_this);
201 
202  a_this->type = CDC_TK;
203 
204  return CR_OK;
205 }
206 
207 /**
208  *Sets the type of the current instance of
209  *#CRToken to INCLUDES_TK (INCLUDES as said by the css2 spec).
210  *@param a_this the current instance of #CRToken.
211  *@return CR_OK upon successfull completion, an error
212  *code otherwise.
213  */
214 enum CRStatus
216 {
217  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
218 
219  cr_token_clear (a_this);
220 
221  a_this->type = INCLUDES_TK;
222 
223  return CR_OK;
224 }
225 
226 /**
227  *Sets the type of the current instance of
228  *#CRToken to DASHMATCH_TK (DASHMATCH as said by the css2 spec).
229  *@param a_this the current instance of #CRToken.
230  *@return CR_OK upon successfull completion, an error
231  *code otherwise.
232  */
233 enum CRStatus
235 {
236  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
237 
238  cr_token_clear (a_this);
239 
240  a_this->type = DASHMATCH_TK;
241 
242  return CR_OK;
243 }
244 
245 enum CRStatus
247 {
248  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
249 
250  cr_token_clear (a_this);
251  a_this->type = COMMENT_TK;
252  a_this->u.str = a_str ;
253  return CR_OK;
254 }
255 
256 enum CRStatus
258 {
259  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
260 
261  cr_token_clear (a_this);
262 
263  a_this->type = STRING_TK;
264 
265  a_this->u.str = a_str ;
266 
267  return CR_OK;
268 }
269 
270 enum CRStatus
271 cr_token_set_ident (CRToken * a_this, CRString * a_ident)
272 {
273  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
274 
275  cr_token_clear (a_this);
276  a_this->type = IDENT_TK;
277  a_this->u.str = a_ident;
278  return CR_OK;
279 }
280 
281 
282 enum CRStatus
283 cr_token_set_function (CRToken * a_this, CRString * a_fun_name)
284 {
285  g_return_val_if_fail (a_this,
287 
288  cr_token_clear (a_this);
289  a_this->type = FUNCTION_TK;
290  a_this->u.str = a_fun_name;
291  return CR_OK;
292 }
293 
294 enum CRStatus
295 cr_token_set_hash (CRToken * a_this, CRString * a_hash)
296 {
297  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
298 
299  cr_token_clear (a_this);
300  a_this->type = HASH_TK;
301  a_this->u.str = a_hash;
302 
303  return CR_OK;
304 }
305 
306 enum CRStatus
307 cr_token_set_rgb (CRToken * a_this, CRRgb * a_rgb)
308 {
309  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
310 
311  cr_token_clear (a_this);
312  a_this->type = RGB_TK;
313  a_this->u.rgb = a_rgb;
314 
315  return CR_OK;
316 }
317 
318 enum CRStatus
320 {
321  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
322 
323  cr_token_clear (a_this);
324 
325  a_this->type = IMPORT_SYM_TK;
326 
327  return CR_OK;
328 }
329 
330 enum CRStatus
332 {
333  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
334 
335  cr_token_clear (a_this);
336 
337  a_this->type = PAGE_SYM_TK;
338 
339  return CR_OK;
340 }
341 
342 enum CRStatus
344 {
345  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
346 
347  cr_token_clear (a_this);
348 
349  a_this->type = MEDIA_SYM_TK;
350 
351  return CR_OK;
352 }
353 
354 enum CRStatus
356 {
357  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
358 
359  cr_token_clear (a_this);
360  a_this->type = FONT_FACE_SYM_TK;
361 
362  return CR_OK;
363 }
364 
365 enum CRStatus
367 {
368  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
369 
370  cr_token_clear (a_this);
371  a_this->type = CHARSET_SYM_TK;
372 
373  return CR_OK;
374 }
375 
376 enum CRStatus
378 {
379  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
380 
381  cr_token_clear (a_this);
382  a_this->type = ATKEYWORD_TK;
383  a_this->u.str = a_atname;
384  return CR_OK;
385 }
386 
387 enum CRStatus
389 {
390  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
391  cr_token_clear (a_this);
392  a_this->type = IMPORTANT_SYM_TK;
393  return CR_OK;
394 }
395 
396 enum CRStatus
397 cr_token_set_ems (CRToken * a_this, CRNum * a_num)
398 {
399  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
400  cr_token_clear (a_this);
401  a_this->type = EMS_TK;
402  a_this->u.num = a_num;
403  return CR_OK;
404 }
405 
406 enum CRStatus
407 cr_token_set_exs (CRToken * a_this, CRNum * a_num)
408 {
409  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
410  cr_token_clear (a_this);
411  a_this->type = EXS_TK;
412  a_this->u.num = a_num;
413  return CR_OK;
414 }
415 
416 enum CRStatus
417 cr_token_set_length (CRToken * a_this, CRNum * a_num,
418  enum CRTokenExtraType a_et)
419 {
420  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
421 
422  cr_token_clear (a_this);
423 
424  a_this->type = LENGTH_TK;
425  a_this->extra_type = a_et;
426  a_this->u.num = a_num;
427 
428  return CR_OK;
429 }
430 
431 enum CRStatus
432 cr_token_set_angle (CRToken * a_this, CRNum * a_num,
433  enum CRTokenExtraType a_et)
434 {
435  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
436 
437  cr_token_clear (a_this);
438 
439  a_this->type = ANGLE_TK;
440  a_this->extra_type = a_et;
441  a_this->u.num = a_num;
442 
443  return CR_OK;
444 }
445 
446 enum CRStatus
447 cr_token_set_time (CRToken * a_this, CRNum * a_num,
448  enum CRTokenExtraType a_et)
449 {
450  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
451 
452  cr_token_clear (a_this);
453 
454  a_this->type = TIME_TK;
455  a_this->extra_type = a_et;
456  a_this->u.num = a_num;
457 
458  return CR_OK;
459 }
460 
461 enum CRStatus
462 cr_token_set_freq (CRToken * a_this, CRNum * a_num,
463  enum CRTokenExtraType a_et)
464 {
465  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
466 
467  cr_token_clear (a_this);
468 
469  a_this->type = FREQ_TK;
470  a_this->extra_type = a_et;
471  a_this->u.num = a_num;
472 
473  return CR_OK;
474 }
475 
476 enum CRStatus
477 cr_token_set_dimen (CRToken * a_this, CRNum * a_num,
478  CRString * a_dim)
479 {
480  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
481  cr_token_clear (a_this);
482  a_this->type = DIMEN_TK;
483  a_this->u.num = a_num;
484  a_this->dimen = a_dim;
485  return CR_OK;
486 
487 }
488 
489 enum CRStatus
491 {
492  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
493 
494  cr_token_clear (a_this);
495 
496  a_this->type = PERCENTAGE_TK;
497  a_this->u.num = a_num;
498 
499  return CR_OK;
500 }
501 
502 enum CRStatus
503 cr_token_set_number (CRToken * a_this, CRNum * a_num)
504 {
505  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
506 
507  cr_token_clear (a_this);
508 
509  a_this->type = NUMBER_TK;
510  a_this->u.num = a_num;
511  return CR_OK;
512 }
513 
514 enum CRStatus
515 cr_token_set_uri (CRToken * a_this, CRString * a_uri)
516 {
517  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
518 
519  cr_token_clear (a_this);
520 
521  a_this->type = URI_TK;
522  a_this->u.str = a_uri;
523 
524  return CR_OK;
525 }
526 
527 enum CRStatus
528 cr_token_set_delim (CRToken * a_this, guint32 a_char)
529 {
530  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
531 
532  cr_token_clear (a_this);
533 
534  a_this->type = DELIM_TK;
535  a_this->u.unichar = a_char;
536 
537  return CR_OK;
538 }
539 
540 enum CRStatus
542 {
543  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
544 
545  cr_token_clear (a_this);
546 
547  a_this->type = SEMICOLON_TK;
548 
549  return CR_OK;
550 }
551 
552 enum CRStatus
554 {
555  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
556 
557  cr_token_clear (a_this);
558 
559  a_this->type = CBO_TK;
560 
561  return CR_OK;
562 }
563 
564 enum CRStatus
566 {
567  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
568 
569  cr_token_clear (a_this);
570 
571  a_this->type = CBC_TK;
572 
573  return CR_OK;
574 }
575 
576 enum CRStatus
578 {
579  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
580 
581  cr_token_clear (a_this);
582 
583  a_this->type = PO_TK;
584 
585  return CR_OK;
586 }
587 
588 enum CRStatus
590 {
591  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
592 
593  cr_token_clear (a_this);
594 
595  a_this->type = PC_TK;
596 
597  return CR_OK;
598 }
599 
600 enum CRStatus
602 {
603  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
604 
605  cr_token_clear (a_this);
606 
607  a_this->type = BO_TK;
608 
609  return CR_OK;
610 }
611 
612 enum CRStatus
614 {
615  g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
616 
617  cr_token_clear (a_this);
618 
619  a_this->type = BC_TK;
620 
621  return CR_OK;
622 }
623 
624 /**
625  *The destructor of the #CRToken class.
626  *@param a_this the current instance of #CRToken.
627  */
628 void
630 {
631  g_return_if_fail (a_this);
632 
633  cr_token_clear (a_this);
634 
635  g_free (a_this);
636 }
PERCENTAGE_TK
@ PERCENTAGE_TK
Definition: cr-token.h:62
TIME_TK
@ TIME_TK
Definition: cr-token.h:59
cr_token_set_ems
enum CRStatus cr_token_set_ems(CRToken *a_this, CRNum *a_num)
Definition: cr-token.c:397
cr_token_set_length
enum CRStatus cr_token_set_length(CRToken *a_this, CRNum *a_num, enum CRTokenExtraType a_et)
Definition: cr-token.c:417
_CRToken::unichar
guint32 unichar
Definition: cr-token.h:112
ANGLE_TK
@ ANGLE_TK
Definition: cr-token.h:58
DELIM_TK
@ DELIM_TK
Definition: cr-token.h:75
DASHMATCH_TK
@ DASHMATCH_TK
Definition: cr-token.h:43
CBC_TK
@ CBC_TK
Definition: cr-token.h:70
CBO_TK
@ CBO_TK
Definition: cr-token.h:69
cr_token_destroy
void cr_token_destroy(CRToken *a_this)
The destructor of the CRToken class.
Definition: cr-token.c:629
BC_TK
@ BC_TK
Definition: cr-token.h:74
cr_token_set_angle
enum CRStatus cr_token_set_angle(CRToken *a_this, CRNum *a_num, enum CRTokenExtraType a_et)
Definition: cr-token.c:432
cr_token_set_rgb
enum CRStatus cr_token_set_rgb(CRToken *a_this, CRRgb *a_rgb)
Definition: cr-token.c:307
HASH_TK
@ HASH_TK
Definition: cr-token.h:47
cr_token_set_font_face_sym
enum CRStatus cr_token_set_font_face_sym(CRToken *a_this)
Definition: cr-token.c:355
cr_token_set_function
enum CRStatus cr_token_set_function(CRToken *a_this, CRString *a_fun_name)
Definition: cr-token.c:283
_CRToken::rgb
CRRgb * rgb
Definition: cr-token.h:110
cr_token_set_percentage
enum CRStatus cr_token_set_percentage(CRToken *a_this, CRNum *a_num)
Definition: cr-token.c:490
cr_token_new
CRToken * cr_token_new(void)
Default constructor of the CRToken class.
Definition: cr-token.c:134
NUMBER_TK
@ NUMBER_TK
Definition: cr-token.h:63
LENGTH_TK
@ LENGTH_TK
Definition: cr-token.h:57
NO_TK
@ NO_TK
Definition: cr-token.h:38
CRTokenExtraType
CRTokenExtraType
Definition: cr-token.h:78
CR_BAD_PARAM_ERROR
@ CR_BAD_PARAM_ERROR
Definition: cr-utils.h:45
cr_token_set_includes
enum CRStatus cr_token_set_includes(CRToken *a_this)
Sets the type of the current instance of CRToken to INCLUDES_TK (INCLUDES as said by the css2 spec).
Definition: cr-token.c:215
_CRToken::extra_type
enum CRTokenExtraType extra_type
Definition: cr-token.h:104
FONT_FACE_SYM_TK
@ FONT_FACE_SYM_TK
Definition: cr-token.h:51
FREQ_TK
@ FREQ_TK
Definition: cr-token.h:60
INCLUDES_TK
@ INCLUDES_TK
Definition: cr-token.h:42
CRString
typedefG_BEGIN_DECLS struct _CRString CRString
Definition: cr-string.h:37
S_TK
@ S_TK
Definition: cr-token.h:39
cr_token_set_bc
enum CRStatus cr_token_set_bc(CRToken *a_this)
Definition: cr-token.c:613
ATKEYWORD_TK
@ ATKEYWORD_TK
Definition: cr-token.h:53
cr_token_set_hash
enum CRStatus cr_token_set_hash(CRToken *a_this, CRString *a_hash)
Definition: cr-token.c:295
RGB_TK
@ RGB_TK
Definition: cr-token.h:64
PO_TK
@ PO_TK
Definition: cr-token.h:71
cr_token_set_time
enum CRStatus cr_token_set_time(CRToken *a_this, CRNum *a_num, enum CRTokenExtraType a_et)
Definition: cr-token.c:447
cr_token_set_exs
enum CRStatus cr_token_set_exs(CRToken *a_this, CRNum *a_num)
Definition: cr-token.c:407
cr_token_set_semicolon
enum CRStatus cr_token_set_semicolon(CRToken *a_this)
Definition: cr-token.c:541
cr_token_set_cdc
enum CRStatus cr_token_set_cdc(CRToken *a_this)
Sets the type of the current token to CDC_TK (CDC as said by the css2 spec).
Definition: cr-token.c:196
cr_string_destroy
void cr_string_destroy(CRString *a_this)
Definition: cr-string.c:159
CR_OK
@ CR_OK
Definition: cr-utils.h:44
_CRNum
An abstraction of a number (num) as defined in the css2 spec.
Definition: cr-num.h:90
cr_token_set_cdo
enum CRStatus cr_token_set_cdo(CRToken *a_this)
Sets the type of the current instance of CRToken to 'CDO_TK' (CDO as said by the css2 spec)
Definition: cr-token.c:177
COMMENT_TK
@ COMMENT_TK
Definition: cr-token.h:44
cr_token_set_delim
enum CRStatus cr_token_set_delim(CRToken *a_this, guint32 a_char)
Definition: cr-token.c:528
_CRToken::type
enum CRTokenType type
Definition: cr-token.h:103
cr_token_set_dashmatch
enum CRStatus cr_token_set_dashmatch(CRToken *a_this)
Sets the type of the current instance of CRToken to DASHMATCH_TK (DASHMATCH as said by the css2 spec)...
Definition: cr-token.c:234
IMPORT_SYM_TK
@ IMPORT_SYM_TK
Definition: cr-token.h:48
cr_num_destroy
void cr_num_destroy(CRNum *a_this)
cr_num_destroy: @a_this: the this pointer of the current instance of CRNum.
Definition: cr-num.c:308
URI_TK
@ URI_TK
Definition: cr-token.h:65
PAGE_SYM_TK
@ PAGE_SYM_TK
Definition: cr-token.h:49
_CRToken::str
CRString * str
Definition: cr-token.h:109
IMPORTANT_SYM_TK
@ IMPORTANT_SYM_TK
Definition: cr-token.h:54
cr_token_set_atkeyword
enum CRStatus cr_token_set_atkeyword(CRToken *a_this, CRString *a_atname)
Definition: cr-token.c:377
PC_TK
@ PC_TK
Definition: cr-token.h:72
cr_token_set_string
enum CRStatus cr_token_set_string(CRToken *a_this, CRString *a_str)
Definition: cr-token.c:257
_CRToken::num
CRNum * num
Definition: cr-token.h:111
cr_token_set_pc
enum CRStatus cr_token_set_pc(CRToken *a_this)
Definition: cr-token.c:589
EXS_TK
@ EXS_TK
Definition: cr-token.h:56
cr_token_set_comment
enum CRStatus cr_token_set_comment(CRToken *a_this, CRString *a_str)
Definition: cr-token.c:246
cr_token_set_cbc
enum CRStatus cr_token_set_cbc(CRToken *a_this)
Definition: cr-token.c:565
cr_token_set_charset_sym
enum CRStatus cr_token_set_charset_sym(CRToken *a_this)
Definition: cr-token.c:366
CRRgb
typedefG_BEGIN_DECLS struct _CRRgb CRRgb
Definition: cr-rgb.h:34
cr_token_set_bo
enum CRStatus cr_token_set_bo(CRToken *a_this)
Definition: cr-token.c:601
cr_token_set_page_sym
enum CRStatus cr_token_set_page_sym(CRToken *a_this)
Definition: cr-token.c:331
cr_token_set_freq
enum CRStatus cr_token_set_freq(CRToken *a_this, CRNum *a_num, enum CRTokenExtraType a_et)
Definition: cr-token.c:462
SEMICOLON_TK
@ SEMICOLON_TK
Definition: cr-token.h:68
cr_token_set_s
enum CRStatus cr_token_set_s(CRToken *a_this)
Sets the type of curren instance of CRToken to 'S_TK' (S in the css2 spec)
Definition: cr-token.c:158
EMS_TK
@ EMS_TK
Definition: cr-token.h:55
MEDIA_SYM_TK
@ MEDIA_SYM_TK
Definition: cr-token.h:50
cr_token_set_number
enum CRStatus cr_token_set_number(CRToken *a_this, CRNum *a_num)
Definition: cr-token.c:503
STRING_TK
@ STRING_TK
Definition: cr-token.h:45
CRStatus
CRStatus
The status type returned by the methods of the croco library.
Definition: cr-utils.h:43
cr_token_set_uri
enum CRStatus cr_token_set_uri(CRToken *a_this, CRString *a_uri)
Definition: cr-token.c:515
cr_token_set_po
enum CRStatus cr_token_set_po(CRToken *a_this)
Definition: cr-token.c:577
cr_rgb_destroy
void cr_rgb_destroy(CRRgb *a_this)
cr_rgb_destroy: @a_this: the "this pointer" of the current instance of CRRgb.
Definition: cr-rgb.c:632
cr_token_set_cbo
enum CRStatus cr_token_set_cbo(CRToken *a_this)
Definition: cr-token.c:553
_CRToken
This class abstracts a css2 token.
Definition: cr-token.h:101
cr_token_set_media_sym
enum CRStatus cr_token_set_media_sym(CRToken *a_this)
Definition: cr-token.c:343
DIMEN_TK
@ DIMEN_TK
Definition: cr-token.h:61
UNICODERANGE_TK
@ UNICODERANGE_TK
Definition: cr-token.h:67
cr_token_set_important_sym
enum CRStatus cr_token_set_important_sym(CRToken *a_this)
Definition: cr-token.c:388
_CRToken::u
union _CRToken::@4 u
CDC_TK
@ CDC_TK
Definition: cr-token.h:41
FUNCTION_TK
@ FUNCTION_TK
Definition: cr-token.h:66
CDO_TK
@ CDO_TK
Definition: cr-token.h:40
cr_utils_trace_info
#define cr_utils_trace_info(a_msg)
Traces an info message.
Definition: cr-utils.h:127
cr_token_set_ident
enum CRStatus cr_token_set_ident(CRToken *a_this, CRString *a_ident)
Definition: cr-token.c:271
CHARSET_SYM_TK
@ CHARSET_SYM_TK
Definition: cr-token.h:52
cr-token.h
IDENT_TK
@ IDENT_TK
Definition: cr-token.h:46
BO_TK
@ BO_TK
Definition: cr-token.h:73
cr_token_set_dimen
enum CRStatus cr_token_set_dimen(CRToken *a_this, CRNum *a_num, CRString *a_dim)
Definition: cr-token.c:477
_CRToken::dimen
CRString * dimen
Definition: cr-token.h:115
cr_token_set_import_sym
enum CRStatus cr_token_set_import_sym(CRToken *a_this)
Definition: cr-token.c:319