Ruby: prism/token_type.c Source File

Ruby 3.4.1p0 (2024-12-25 revision 48d4efcb85000e1ebae42004e963b5d0cedddcf2)

token_type.c
1/*----------------------------------------------------------------------------*/
2/* This file is generated by the templates/template.rb script and should not */
3/* be modified manually. See */
4/* templates/src/token_type.c.erb */
5/* if you are looking to modify the */
6/* template */
7/*----------------------------------------------------------------------------*/
8
9#include <string.h>
10
11#include "prism/ast.h"
12
16 PRISM_EXPORTED_FUNCTION const char *
17pm_token_type_name(pm_token_type_t token_type) {
18 switch (token_type) {
19 case PM_TOKEN_EOF:
20 return "EOF";
21 case PM_TOKEN_MISSING:
22 return "MISSING";
23 case PM_TOKEN_NOT_PROVIDED:
24 return "NOT_PROVIDED";
25 case PM_TOKEN_AMPERSAND:
26 return "AMPERSAND";
27 case PM_TOKEN_AMPERSAND_AMPERSAND:
28 return "AMPERSAND_AMPERSAND";
29 case PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL:
30 return "AMPERSAND_AMPERSAND_EQUAL";
31 case PM_TOKEN_AMPERSAND_DOT:
32 return "AMPERSAND_DOT";
33 case PM_TOKEN_AMPERSAND_EQUAL:
34 return "AMPERSAND_EQUAL";
35 case PM_TOKEN_BACKTICK:
36 return "BACKTICK";
37 case PM_TOKEN_BACK_REFERENCE:
38 return "BACK_REFERENCE";
39 case PM_TOKEN_BANG:
40 return "BANG";
41 case PM_TOKEN_BANG_EQUAL:
42 return "BANG_EQUAL";
43 case PM_TOKEN_BANG_TILDE:
44 return "BANG_TILDE";
45 case PM_TOKEN_BRACE_LEFT:
46 return "BRACE_LEFT";
47 case PM_TOKEN_BRACE_RIGHT:
48 return "BRACE_RIGHT";
49 case PM_TOKEN_BRACKET_LEFT:
50 return "BRACKET_LEFT";
51 case PM_TOKEN_BRACKET_LEFT_ARRAY:
52 return "BRACKET_LEFT_ARRAY";
53 case PM_TOKEN_BRACKET_LEFT_RIGHT:
54 return "BRACKET_LEFT_RIGHT";
55 case PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL:
56 return "BRACKET_LEFT_RIGHT_EQUAL";
57 case PM_TOKEN_BRACKET_RIGHT:
58 return "BRACKET_RIGHT";
59 case PM_TOKEN_CARET:
60 return "CARET";
61 case PM_TOKEN_CARET_EQUAL:
62 return "CARET_EQUAL";
63 case PM_TOKEN_CHARACTER_LITERAL:
64 return "CHARACTER_LITERAL";
65 case PM_TOKEN_CLASS_VARIABLE:
66 return "CLASS_VARIABLE";
67 case PM_TOKEN_COLON:
68 return "COLON";
69 case PM_TOKEN_COLON_COLON:
70 return "COLON_COLON";
71 case PM_TOKEN_COMMA:
72 return "COMMA";
73 case PM_TOKEN_COMMENT:
74 return "COMMENT";
75 case PM_TOKEN_CONSTANT:
76 return "CONSTANT";
77 case PM_TOKEN_DOT:
78 return "DOT";
79 case PM_TOKEN_DOT_DOT:
80 return "DOT_DOT";
81 case PM_TOKEN_DOT_DOT_DOT:
82 return "DOT_DOT_DOT";
83 case PM_TOKEN_EMBDOC_BEGIN:
84 return "EMBDOC_BEGIN";
85 case PM_TOKEN_EMBDOC_END:
86 return "EMBDOC_END";
87 case PM_TOKEN_EMBDOC_LINE:
88 return "EMBDOC_LINE";
89 case PM_TOKEN_EMBEXPR_BEGIN:
90 return "EMBEXPR_BEGIN";
91 case PM_TOKEN_EMBEXPR_END:
92 return "EMBEXPR_END";
93 case PM_TOKEN_EMBVAR:
94 return "EMBVAR";
95 case PM_TOKEN_EQUAL:
96 return "EQUAL";
97 case PM_TOKEN_EQUAL_EQUAL:
98 return "EQUAL_EQUAL";
99 case PM_TOKEN_EQUAL_EQUAL_EQUAL:
100 return "EQUAL_EQUAL_EQUAL";
101 case PM_TOKEN_EQUAL_GREATER:
102 return "EQUAL_GREATER";
103 case PM_TOKEN_EQUAL_TILDE:
104 return "EQUAL_TILDE";
105 case PM_TOKEN_FLOAT:
106 return "FLOAT";
107 case PM_TOKEN_FLOAT_IMAGINARY:
108 return "FLOAT_IMAGINARY";
109 case PM_TOKEN_FLOAT_RATIONAL:
110 return "FLOAT_RATIONAL";
111 case PM_TOKEN_FLOAT_RATIONAL_IMAGINARY:
112 return "FLOAT_RATIONAL_IMAGINARY";
113 case PM_TOKEN_GLOBAL_VARIABLE:
114 return "GLOBAL_VARIABLE";
115 case PM_TOKEN_GREATER:
116 return "GREATER";
117 case PM_TOKEN_GREATER_EQUAL:
118 return "GREATER_EQUAL";
119 case PM_TOKEN_GREATER_GREATER:
120 return "GREATER_GREATER";
121 case PM_TOKEN_GREATER_GREATER_EQUAL:
122 return "GREATER_GREATER_EQUAL";
123 case PM_TOKEN_HEREDOC_END:
124 return "HEREDOC_END";
125 case PM_TOKEN_HEREDOC_START:
126 return "HEREDOC_START";
127 case PM_TOKEN_IDENTIFIER:
128 return "IDENTIFIER";
129 case PM_TOKEN_IGNORED_NEWLINE:
130 return "IGNORED_NEWLINE";
131 case PM_TOKEN_INSTANCE_VARIABLE:
132 return "INSTANCE_VARIABLE";
133 case PM_TOKEN_INTEGER:
134 return "INTEGER";
135 case PM_TOKEN_INTEGER_IMAGINARY:
136 return "INTEGER_IMAGINARY";
137 case PM_TOKEN_INTEGER_RATIONAL:
138 return "INTEGER_RATIONAL";
139 case PM_TOKEN_INTEGER_RATIONAL_IMAGINARY:
140 return "INTEGER_RATIONAL_IMAGINARY";
141 case PM_TOKEN_KEYWORD_ALIAS:
142 return "KEYWORD_ALIAS";
143 case PM_TOKEN_KEYWORD_AND:
144 return "KEYWORD_AND";
145 case PM_TOKEN_KEYWORD_BEGIN:
146 return "KEYWORD_BEGIN";
147 case PM_TOKEN_KEYWORD_BEGIN_UPCASE:
148 return "KEYWORD_BEGIN_UPCASE";
149 case PM_TOKEN_KEYWORD_BREAK:
150 return "KEYWORD_BREAK";
151 case PM_TOKEN_KEYWORD_CASE:
152 return "KEYWORD_CASE";
153 case PM_TOKEN_KEYWORD_CLASS:
154 return "KEYWORD_CLASS";
155 case PM_TOKEN_KEYWORD_DEF:
156 return "KEYWORD_DEF";
157 case PM_TOKEN_KEYWORD_DEFINED:
158 return "KEYWORD_DEFINED";
159 case PM_TOKEN_KEYWORD_DO:
160 return "KEYWORD_DO";
161 case PM_TOKEN_KEYWORD_DO_LOOP:
162 return "KEYWORD_DO_LOOP";
163 case PM_TOKEN_KEYWORD_ELSE:
164 return "KEYWORD_ELSE";
165 case PM_TOKEN_KEYWORD_ELSIF:
166 return "KEYWORD_ELSIF";
167 case PM_TOKEN_KEYWORD_END:
168 return "KEYWORD_END";
169 case PM_TOKEN_KEYWORD_END_UPCASE:
170 return "KEYWORD_END_UPCASE";
171 case PM_TOKEN_KEYWORD_ENSURE:
172 return "KEYWORD_ENSURE";
173 case PM_TOKEN_KEYWORD_FALSE:
174 return "KEYWORD_FALSE";
175 case PM_TOKEN_KEYWORD_FOR:
176 return "KEYWORD_FOR";
177 case PM_TOKEN_KEYWORD_IF:
178 return "KEYWORD_IF";
179 case PM_TOKEN_KEYWORD_IF_MODIFIER:
180 return "KEYWORD_IF_MODIFIER";
181 case PM_TOKEN_KEYWORD_IN:
182 return "KEYWORD_IN";
183 case PM_TOKEN_KEYWORD_MODULE:
184 return "KEYWORD_MODULE";
185 case PM_TOKEN_KEYWORD_NEXT:
186 return "KEYWORD_NEXT";
187 case PM_TOKEN_KEYWORD_NIL:
188 return "KEYWORD_NIL";
189 case PM_TOKEN_KEYWORD_NOT:
190 return "KEYWORD_NOT";
191 case PM_TOKEN_KEYWORD_OR:
192 return "KEYWORD_OR";
193 case PM_TOKEN_KEYWORD_REDO:
194 return "KEYWORD_REDO";
195 case PM_TOKEN_KEYWORD_RESCUE:
196 return "KEYWORD_RESCUE";
197 case PM_TOKEN_KEYWORD_RESCUE_MODIFIER:
198 return "KEYWORD_RESCUE_MODIFIER";
199 case PM_TOKEN_KEYWORD_RETRY:
200 return "KEYWORD_RETRY";
201 case PM_TOKEN_KEYWORD_RETURN:
202 return "KEYWORD_RETURN";
203 case PM_TOKEN_KEYWORD_SELF:
204 return "KEYWORD_SELF";
205 case PM_TOKEN_KEYWORD_SUPER:
206 return "KEYWORD_SUPER";
207 case PM_TOKEN_KEYWORD_THEN:
208 return "KEYWORD_THEN";
209 case PM_TOKEN_KEYWORD_TRUE:
210 return "KEYWORD_TRUE";
211 case PM_TOKEN_KEYWORD_UNDEF:
212 return "KEYWORD_UNDEF";
213 case PM_TOKEN_KEYWORD_UNLESS:
214 return "KEYWORD_UNLESS";
215 case PM_TOKEN_KEYWORD_UNLESS_MODIFIER:
216 return "KEYWORD_UNLESS_MODIFIER";
217 case PM_TOKEN_KEYWORD_UNTIL:
218 return "KEYWORD_UNTIL";
219 case PM_TOKEN_KEYWORD_UNTIL_MODIFIER:
220 return "KEYWORD_UNTIL_MODIFIER";
221 case PM_TOKEN_KEYWORD_WHEN:
222 return "KEYWORD_WHEN";
223 case PM_TOKEN_KEYWORD_WHILE:
224 return "KEYWORD_WHILE";
225 case PM_TOKEN_KEYWORD_WHILE_MODIFIER:
226 return "KEYWORD_WHILE_MODIFIER";
227 case PM_TOKEN_KEYWORD_YIELD:
228 return "KEYWORD_YIELD";
229 case PM_TOKEN_KEYWORD___ENCODING__:
230 return "KEYWORD___ENCODING__";
231 case PM_TOKEN_KEYWORD___FILE__:
232 return "KEYWORD___FILE__";
233 case PM_TOKEN_KEYWORD___LINE__:
234 return "KEYWORD___LINE__";
235 case PM_TOKEN_LABEL:
236 return "LABEL";
237 case PM_TOKEN_LABEL_END:
238 return "LABEL_END";
239 case PM_TOKEN_LAMBDA_BEGIN:
240 return "LAMBDA_BEGIN";
241 case PM_TOKEN_LESS:
242 return "LESS";
243 case PM_TOKEN_LESS_EQUAL:
244 return "LESS_EQUAL";
245 case PM_TOKEN_LESS_EQUAL_GREATER:
246 return "LESS_EQUAL_GREATER";
247 case PM_TOKEN_LESS_LESS:
248 return "LESS_LESS";
249 case PM_TOKEN_LESS_LESS_EQUAL:
250 return "LESS_LESS_EQUAL";
251 case PM_TOKEN_METHOD_NAME:
252 return "METHOD_NAME";
253 case PM_TOKEN_MINUS:
254 return "MINUS";
255 case PM_TOKEN_MINUS_EQUAL:
256 return "MINUS_EQUAL";
257 case PM_TOKEN_MINUS_GREATER:
258 return "MINUS_GREATER";
259 case PM_TOKEN_NEWLINE:
260 return "NEWLINE";
261 case PM_TOKEN_NUMBERED_REFERENCE:
262 return "NUMBERED_REFERENCE";
263 case PM_TOKEN_PARENTHESIS_LEFT:
264 return "PARENTHESIS_LEFT";
265 case PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES:
266 return "PARENTHESIS_LEFT_PARENTHESES";
267 case PM_TOKEN_PARENTHESIS_RIGHT:
268 return "PARENTHESIS_RIGHT";
269 case PM_TOKEN_PERCENT:
270 return "PERCENT";
271 case PM_TOKEN_PERCENT_EQUAL:
272 return "PERCENT_EQUAL";
273 case PM_TOKEN_PERCENT_LOWER_I:
274 return "PERCENT_LOWER_I";
275 case PM_TOKEN_PERCENT_LOWER_W:
276 return "PERCENT_LOWER_W";
277 case PM_TOKEN_PERCENT_LOWER_X:
278 return "PERCENT_LOWER_X";
279 case PM_TOKEN_PERCENT_UPPER_I:
280 return "PERCENT_UPPER_I";
281 case PM_TOKEN_PERCENT_UPPER_W:
282 return "PERCENT_UPPER_W";
283 case PM_TOKEN_PIPE:
284 return "PIPE";
285 case PM_TOKEN_PIPE_EQUAL:
286 return "PIPE_EQUAL";
287 case PM_TOKEN_PIPE_PIPE:
288 return "PIPE_PIPE";
289 case PM_TOKEN_PIPE_PIPE_EQUAL:
290 return "PIPE_PIPE_EQUAL";
291 case PM_TOKEN_PLUS:
292 return "PLUS";
293 case PM_TOKEN_PLUS_EQUAL:
294 return "PLUS_EQUAL";
295 case PM_TOKEN_QUESTION_MARK:
296 return "QUESTION_MARK";
297 case PM_TOKEN_REGEXP_BEGIN:
298 return "REGEXP_BEGIN";
299 case PM_TOKEN_REGEXP_END:
300 return "REGEXP_END";
301 case PM_TOKEN_SEMICOLON:
302 return "SEMICOLON";
303 case PM_TOKEN_SLASH:
304 return "SLASH";
305 case PM_TOKEN_SLASH_EQUAL:
306 return "SLASH_EQUAL";
307 case PM_TOKEN_STAR:
308 return "STAR";
309 case PM_TOKEN_STAR_EQUAL:
310 return "STAR_EQUAL";
311 case PM_TOKEN_STAR_STAR:
312 return "STAR_STAR";
313 case PM_TOKEN_STAR_STAR_EQUAL:
314 return "STAR_STAR_EQUAL";
315 case PM_TOKEN_STRING_BEGIN:
316 return "STRING_BEGIN";
317 case PM_TOKEN_STRING_CONTENT:
318 return "STRING_CONTENT";
319 case PM_TOKEN_STRING_END:
320 return "STRING_END";
321 case PM_TOKEN_SYMBOL_BEGIN:
322 return "SYMBOL_BEGIN";
323 case PM_TOKEN_TILDE:
324 return "TILDE";
325 case PM_TOKEN_UAMPERSAND:
326 return "UAMPERSAND";
327 case PM_TOKEN_UCOLON_COLON:
328 return "UCOLON_COLON";
329 case PM_TOKEN_UDOT_DOT:
330 return "UDOT_DOT";
331 case PM_TOKEN_UDOT_DOT_DOT:
332 return "UDOT_DOT_DOT";
333 case PM_TOKEN_UMINUS:
334 return "UMINUS";
335 case PM_TOKEN_UMINUS_NUM:
336 return "UMINUS_NUM";
337 case PM_TOKEN_UPLUS:
338 return "UPLUS";
339 case PM_TOKEN_USTAR:
340 return "USTAR";
341 case PM_TOKEN_USTAR_STAR:
342 return "USTAR_STAR";
343 case PM_TOKEN_WORDS_SEP:
344 return "WORDS_SEP";
345 case PM_TOKEN___END__:
346 return "__END__";
347 case PM_TOKEN_MAXIMUM:
348 assert(false && "unreachable");
349 return "";
350 }
351
352 // Provide a default, because some compilers can't determine that the above
353 // switch is exhaustive.
354 assert(false && "unreachable");
355 return "";
356}
357
361const char *
362pm_token_type_human(pm_token_type_t token_type) {
363 switch (token_type) {
364 case PM_TOKEN_EOF:
365 return "end-of-input";
366 case PM_TOKEN_MISSING:
367 return "missing token";
368 case PM_TOKEN_NOT_PROVIDED:
369 return "not provided token";
370 case PM_TOKEN_AMPERSAND:
371 return "'&'";
372 case PM_TOKEN_AMPERSAND_AMPERSAND:
373 return "'&&'";
374 case PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL:
375 return "'&&='";
376 case PM_TOKEN_AMPERSAND_DOT:
377 return "'&.'";
378 case PM_TOKEN_AMPERSAND_EQUAL:
379 return "'&='";
380 case PM_TOKEN_BACKTICK:
381 return "'`'";
382 case PM_TOKEN_BACK_REFERENCE:
383 return "back reference";
384 case PM_TOKEN_BANG:
385 return "'!'";
386 case PM_TOKEN_BANG_EQUAL:
387 return "'!='";
388 case PM_TOKEN_BANG_TILDE:
389 return "'!~'";
390 case PM_TOKEN_BRACE_LEFT:
391 return "'{'";
392 case PM_TOKEN_BRACE_RIGHT:
393 return "'}'";
394 case PM_TOKEN_BRACKET_LEFT:
395 return "'['";
396 case PM_TOKEN_BRACKET_LEFT_ARRAY:
397 return "'['";
398 case PM_TOKEN_BRACKET_LEFT_RIGHT:
399 return "'[]'";
400 case PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL:
401 return "'[]='";
402 case PM_TOKEN_BRACKET_RIGHT:
403 return "']'";
404 case PM_TOKEN_CARET:
405 return "'^'";
406 case PM_TOKEN_CARET_EQUAL:
407 return "'^='";
408 case PM_TOKEN_CHARACTER_LITERAL:
409 return "character literal";
410 case PM_TOKEN_CLASS_VARIABLE:
411 return "class variable";
412 case PM_TOKEN_COLON:
413 return "':'";
414 case PM_TOKEN_COLON_COLON:
415 return "'::'";
416 case PM_TOKEN_COMMA:
417 return "','";
418 case PM_TOKEN_COMMENT:
419 return "comment";
420 case PM_TOKEN_CONSTANT:
421 return "constant";
422 case PM_TOKEN_DOT:
423 return "'.'";
424 case PM_TOKEN_DOT_DOT:
425 return "..";
426 case PM_TOKEN_DOT_DOT_DOT:
427 return "...";
428 case PM_TOKEN_EMBDOC_BEGIN:
429 return "'=begin'";
430 case PM_TOKEN_EMBDOC_END:
431 return "'=end'";
432 case PM_TOKEN_EMBDOC_LINE:
433 return "embedded documentation line";
434 case PM_TOKEN_EMBEXPR_BEGIN:
435 return "'#{'";
436 case PM_TOKEN_EMBEXPR_END:
437 return "'}'";
438 case PM_TOKEN_EMBVAR:
439 return "'#'";
440 case PM_TOKEN_EQUAL:
441 return "'='";
442 case PM_TOKEN_EQUAL_EQUAL:
443 return "'=='";
444 case PM_TOKEN_EQUAL_EQUAL_EQUAL:
445 return "'==='";
446 case PM_TOKEN_EQUAL_GREATER:
447 return "'=>'";
448 case PM_TOKEN_EQUAL_TILDE:
449 return "'=~'";
450 case PM_TOKEN_FLOAT:
451 return "float";
452 case PM_TOKEN_FLOAT_IMAGINARY:
453 return "imaginary";
454 case PM_TOKEN_FLOAT_RATIONAL:
455 return "rational";
456 case PM_TOKEN_FLOAT_RATIONAL_IMAGINARY:
457 return "imaginary";
458 case PM_TOKEN_GLOBAL_VARIABLE:
459 return "global variable";
460 case PM_TOKEN_GREATER:
461 return "'>'";
462 case PM_TOKEN_GREATER_EQUAL:
463 return "'>='";
464 case PM_TOKEN_GREATER_GREATER:
465 return ">>";
466 case PM_TOKEN_GREATER_GREATER_EQUAL:
467 return ">>=";
468 case PM_TOKEN_HEREDOC_END:
469 return "heredoc ending";
470 case PM_TOKEN_HEREDOC_START:
471 return "heredoc beginning";
472 case PM_TOKEN_IDENTIFIER:
473 return "local variable or method";
474 case PM_TOKEN_IGNORED_NEWLINE:
475 return "ignored newline";
476 case PM_TOKEN_INSTANCE_VARIABLE:
477 return "instance variable";
478 case PM_TOKEN_INTEGER:
479 return "integer";
480 case PM_TOKEN_INTEGER_IMAGINARY:
481 return "imaginary";
482 case PM_TOKEN_INTEGER_RATIONAL:
483 return "rational";
484 case PM_TOKEN_INTEGER_RATIONAL_IMAGINARY:
485 return "imaginary";
486 case PM_TOKEN_KEYWORD_ALIAS:
487 return "'alias'";
488 case PM_TOKEN_KEYWORD_AND:
489 return "'and'";
490 case PM_TOKEN_KEYWORD_BEGIN:
491 return "'begin'";
492 case PM_TOKEN_KEYWORD_BEGIN_UPCASE:
493 return "'BEGIN'";
494 case PM_TOKEN_KEYWORD_BREAK:
495 return "'break'";
496 case PM_TOKEN_KEYWORD_CASE:
497 return "'case'";
498 case PM_TOKEN_KEYWORD_CLASS:
499 return "'class'";
500 case PM_TOKEN_KEYWORD_DEF:
501 return "'def'";
502 case PM_TOKEN_KEYWORD_DEFINED:
503 return "'defined?'";
504 case PM_TOKEN_KEYWORD_DO:
505 return "'do'";
506 case PM_TOKEN_KEYWORD_DO_LOOP:
507 return "'do'";
508 case PM_TOKEN_KEYWORD_ELSE:
509 return "'else'";
510 case PM_TOKEN_KEYWORD_ELSIF:
511 return "'elsif'";
512 case PM_TOKEN_KEYWORD_END:
513 return "'end'";
514 case PM_TOKEN_KEYWORD_END_UPCASE:
515 return "'END'";
516 case PM_TOKEN_KEYWORD_ENSURE:
517 return "'ensure'";
518 case PM_TOKEN_KEYWORD_FALSE:
519 return "'false'";
520 case PM_TOKEN_KEYWORD_FOR:
521 return "'for'";
522 case PM_TOKEN_KEYWORD_IF:
523 return "'if'";
524 case PM_TOKEN_KEYWORD_IF_MODIFIER:
525 return "'if'";
526 case PM_TOKEN_KEYWORD_IN:
527 return "'in'";
528 case PM_TOKEN_KEYWORD_MODULE:
529 return "'module'";
530 case PM_TOKEN_KEYWORD_NEXT:
531 return "'next'";
532 case PM_TOKEN_KEYWORD_NIL:
533 return "'nil'";
534 case PM_TOKEN_KEYWORD_NOT:
535 return "'not'";
536 case PM_TOKEN_KEYWORD_OR:
537 return "'or'";
538 case PM_TOKEN_KEYWORD_REDO:
539 return "'redo'";
540 case PM_TOKEN_KEYWORD_RESCUE:
541 return "'rescue'";
542 case PM_TOKEN_KEYWORD_RESCUE_MODIFIER:
543 return "'rescue' modifier";
544 case PM_TOKEN_KEYWORD_RETRY:
545 return "'retry'";
546 case PM_TOKEN_KEYWORD_RETURN:
547 return "'return'";
548 case PM_TOKEN_KEYWORD_SELF:
549 return "'self'";
550 case PM_TOKEN_KEYWORD_SUPER:
551 return "'super'";
552 case PM_TOKEN_KEYWORD_THEN:
553 return "'then'";
554 case PM_TOKEN_KEYWORD_TRUE:
555 return "'true'";
556 case PM_TOKEN_KEYWORD_UNDEF:
557 return "'undef'";
558 case PM_TOKEN_KEYWORD_UNLESS:
559 return "'unless'";
560 case PM_TOKEN_KEYWORD_UNLESS_MODIFIER:
561 return "'unless'";
562 case PM_TOKEN_KEYWORD_UNTIL:
563 return "'until'";
564 case PM_TOKEN_KEYWORD_UNTIL_MODIFIER:
565 return "'until'";
566 case PM_TOKEN_KEYWORD_WHEN:
567 return "'when'";
568 case PM_TOKEN_KEYWORD_WHILE:
569 return "'while'";
570 case PM_TOKEN_KEYWORD_WHILE_MODIFIER:
571 return "'while'";
572 case PM_TOKEN_KEYWORD_YIELD:
573 return "'yield'";
574 case PM_TOKEN_KEYWORD___ENCODING__:
575 return "'__ENCODING__'";
576 case PM_TOKEN_KEYWORD___FILE__:
577 return "'__FILE__'";
578 case PM_TOKEN_KEYWORD___LINE__:
579 return "'__LINE__'";
580 case PM_TOKEN_LABEL:
581 return "label";
582 case PM_TOKEN_LABEL_END:
583 return "label terminator";
584 case PM_TOKEN_LAMBDA_BEGIN:
585 return "'{'";
586 case PM_TOKEN_LESS:
587 return "'<'";
588 case PM_TOKEN_LESS_EQUAL:
589 return "'<='";
590 case PM_TOKEN_LESS_EQUAL_GREATER:
591 return "'<=>'";
592 case PM_TOKEN_LESS_LESS:
593 return "<<";
594 case PM_TOKEN_LESS_LESS_EQUAL:
595 return "<<=";
596 case PM_TOKEN_METHOD_NAME:
597 return "method name";
598 case PM_TOKEN_MINUS:
599 return "'-'";
600 case PM_TOKEN_MINUS_EQUAL:
601 return "'-='";
602 case PM_TOKEN_MINUS_GREATER:
603 return "'->'";
604 case PM_TOKEN_NEWLINE:
605 return "newline";
606 case PM_TOKEN_NUMBERED_REFERENCE:
607 return "numbered reference";
608 case PM_TOKEN_PARENTHESIS_LEFT:
609 return "'('";
610 case PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES:
611 return "'('";
612 case PM_TOKEN_PARENTHESIS_RIGHT:
613 return "')'";
614 case PM_TOKEN_PERCENT:
615 return "'%'";
616 case PM_TOKEN_PERCENT_EQUAL:
617 return "'%='";
618 case PM_TOKEN_PERCENT_LOWER_I:
619 return "'%i'";
620 case PM_TOKEN_PERCENT_LOWER_W:
621 return "'%w'";
622 case PM_TOKEN_PERCENT_LOWER_X:
623 return "'%x'";
624 case PM_TOKEN_PERCENT_UPPER_I:
625 return "'%I'";
626 case PM_TOKEN_PERCENT_UPPER_W:
627 return "'%W'";
628 case PM_TOKEN_PIPE:
629 return "'|'";
630 case PM_TOKEN_PIPE_EQUAL:
631 return "'|='";
632 case PM_TOKEN_PIPE_PIPE:
633 return "'||'";
634 case PM_TOKEN_PIPE_PIPE_EQUAL:
635 return "'||='";
636 case PM_TOKEN_PLUS:
637 return "'+'";
638 case PM_TOKEN_PLUS_EQUAL:
639 return "'+='";
640 case PM_TOKEN_QUESTION_MARK:
641 return "'?'";
642 case PM_TOKEN_REGEXP_BEGIN:
643 return "regular expression beginning";
644 case PM_TOKEN_REGEXP_END:
645 return "regular expression ending";
646 case PM_TOKEN_SEMICOLON:
647 return "';'";
648 case PM_TOKEN_SLASH:
649 return "'/'";
650 case PM_TOKEN_SLASH_EQUAL:
651 return "'/='";
652 case PM_TOKEN_STAR:
653 return "'*'";
654 case PM_TOKEN_STAR_EQUAL:
655 return "'*='";
656 case PM_TOKEN_STAR_STAR:
657 return "'**'";
658 case PM_TOKEN_STAR_STAR_EQUAL:
659 return "'**='";
660 case PM_TOKEN_STRING_BEGIN:
661 return "string literal";
662 case PM_TOKEN_STRING_CONTENT:
663 return "string content";
664 case PM_TOKEN_STRING_END:
665 return "string ending";
666 case PM_TOKEN_SYMBOL_BEGIN:
667 return "symbol literal";
668 case PM_TOKEN_TILDE:
669 return "'~'";
670 case PM_TOKEN_UAMPERSAND:
671 return "'&'";
672 case PM_TOKEN_UCOLON_COLON:
673 return "'::'";
674 case PM_TOKEN_UDOT_DOT:
675 return "'..'";
676 case PM_TOKEN_UDOT_DOT_DOT:
677 return "'...'";
678 case PM_TOKEN_UMINUS:
679 return "'-'";
680 case PM_TOKEN_UMINUS_NUM:
681 return "'-'";
682 case PM_TOKEN_UPLUS:
683 return "'+'";
684 case PM_TOKEN_USTAR:
685 return "*";
686 case PM_TOKEN_USTAR_STAR:
687 return "**";
688 case PM_TOKEN_WORDS_SEP:
689 return "string separator";
690 case PM_TOKEN___END__:
691 return "'__END__'";
692 case PM_TOKEN_MAXIMUM:
693 assert(false && "unreachable");
694 return "";
695 }
696
697 // Provide a default, because some compilers can't determine that the above
698 // switch is exhaustive.
699 assert(false && "unreachable");
700 return "";
701}
ast.h
The abstract syntax tree.
pm_token_type_t
enum pm_token_type pm_token_type_t
This enum represents every type of token in the Ruby source.
PM_TOKEN_STAR_STAR
@ PM_TOKEN_STAR_STAR
**
Definition ast.h:469
PM_TOKEN_DOT_DOT_DOT
@ PM_TOKEN_DOT_DOT_DOT
the ... range operator or forwarding parameter
Definition ast.h:124
PM_TOKEN_MINUS_EQUAL
@ PM_TOKEN_MINUS_EQUAL
-=
Definition ast.h:385
PM_TOKEN_IGNORED_NEWLINE
@ PM_TOKEN_IGNORED_NEWLINE
an ignored newline
Definition ast.h:196
PM_TOKEN_BANG_EQUAL
@ PM_TOKEN_BANG_EQUAL
!=
Definition ast.h:64
PM_TOKEN_KEYWORD___FILE__
@ PM_TOKEN_KEYWORD___FILE__
FILE
Definition ast.h:349
PM_TOKEN_KEYWORD_WHEN
@ PM_TOKEN_KEYWORD_WHEN
when
Definition ast.h:334
PM_TOKEN_FLOAT
@ PM_TOKEN_FLOAT
a floating point number
Definition ast.h:160
PM_TOKEN_PLUS_EQUAL
@ PM_TOKEN_PLUS_EQUAL
+=
Definition ast.h:442
PM_TOKEN_DOT_DOT
@ PM_TOKEN_DOT_DOT
the .
Definition ast.h:121
PM_TOKEN_UDOT_DOT
@ PM_TOKEN_UDOT_DOT
unary .
Definition ast.h:496
PM_TOKEN_AMPERSAND_DOT
@ PM_TOKEN_AMPERSAND_DOT
&.
Definition ast.h:49
PM_TOKEN_NEWLINE
@ PM_TOKEN_NEWLINE
a newline character outside of other tokens
Definition ast.h:391
PM_TOKEN_NUMBERED_REFERENCE
@ PM_TOKEN_NUMBERED_REFERENCE
a numbered reference to a capture group in the previous regular expression match
Definition ast.h:394
PM_TOKEN_AMPERSAND
@ PM_TOKEN_AMPERSAND
&
Definition ast.h:40
PM_TOKEN_KEYWORD_YIELD
@ PM_TOKEN_KEYWORD_YIELD
yield
Definition ast.h:343
PM_TOKEN_KEYWORD_END
@ PM_TOKEN_KEYWORD_END
end
Definition ast.h:253
PM_TOKEN_LAMBDA_BEGIN
@ PM_TOKEN_LAMBDA_BEGIN
{
Definition ast.h:361
PM_TOKEN_KEYWORD_UNTIL_MODIFIER
@ PM_TOKEN_KEYWORD_UNTIL_MODIFIER
until in the modifier form
Definition ast.h:331
PM_TOKEN_EQUAL_EQUAL_EQUAL
@ PM_TOKEN_EQUAL_EQUAL_EQUAL
===
Definition ast.h:151
PM_TOKEN_INTEGER_RATIONAL
@ PM_TOKEN_INTEGER_RATIONAL
an integer with a rational suffix
Definition ast.h:208
PM_TOKEN_USTAR
@ PM_TOKEN_USTAR
unary *
Definition ast.h:511
PM_TOKEN_TILDE
@ PM_TOKEN_TILDE
~ or ~@
Definition ast.h:487
PM_TOKEN_KEYWORD___ENCODING__
@ PM_TOKEN_KEYWORD___ENCODING__
ENCODING
Definition ast.h:346
PM_TOKEN_REGEXP_END
@ PM_TOKEN_REGEXP_END
the end of a regular expression
Definition ast.h:451
PM_TOKEN_KEYWORD_UNTIL
@ PM_TOKEN_KEYWORD_UNTIL
until
Definition ast.h:328
PM_TOKEN_COMMA
@ PM_TOKEN_COMMA
,
Definition ast.h:109
PM_TOKEN_MAXIMUM
@ PM_TOKEN_MAXIMUM
The maximum token value.
Definition ast.h:523
PM_TOKEN_GREATER
@ PM_TOKEN_GREATER
Definition ast.h:175
PM_TOKEN_INTEGER
@ PM_TOKEN_INTEGER
an integer (any base)
Definition ast.h:202
PM_TOKEN_SLASH_EQUAL
@ PM_TOKEN_SLASH_EQUAL
/=
Definition ast.h:460
PM_TOKEN_UMINUS_NUM
@ PM_TOKEN_UMINUS_NUM
-@ for a number
Definition ast.h:505
PM_TOKEN_EMBVAR
@ PM_TOKEN_EMBVAR
Definition ast.h:142
PM_TOKEN_KEYWORD_UNLESS_MODIFIER
@ PM_TOKEN_KEYWORD_UNLESS_MODIFIER
unless in the modifier form
Definition ast.h:325
PM_TOKEN_INTEGER_RATIONAL_IMAGINARY
@ PM_TOKEN_INTEGER_RATIONAL_IMAGINARY
an integer with a rational and imaginary suffix
Definition ast.h:211
PM_TOKEN_FLOAT_RATIONAL_IMAGINARY
@ PM_TOKEN_FLOAT_RATIONAL_IMAGINARY
a floating pointer number with a rational and imaginary suffix
Definition ast.h:169
PM_TOKEN_BRACKET_LEFT_RIGHT
@ PM_TOKEN_BRACKET_LEFT_RIGHT
[]
Definition ast.h:82
PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL
@ PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL
&&=
Definition ast.h:46
PM_TOKEN_KEYWORD_CLASS
@ PM_TOKEN_KEYWORD_CLASS
class
Definition ast.h:232
PM_TOKEN_KEYWORD_BEGIN
@ PM_TOKEN_KEYWORD_BEGIN
begin
Definition ast.h:220
PM_TOKEN_NOT_PROVIDED
@ PM_TOKEN_NOT_PROVIDED
a token that was not present but it is okay
Definition ast.h:37
PM_TOKEN_USTAR_STAR
@ PM_TOKEN_USTAR_STAR
unary **
Definition ast.h:514
PM_TOKEN_GREATER_GREATER_EQUAL
@ PM_TOKEN_GREATER_GREATER_EQUAL
Definition ast.h:184
PM_TOKEN_PERCENT_EQUAL
@ PM_TOKEN_PERCENT_EQUAL
%=
Definition ast.h:409
PM_TOKEN_PERCENT
@ PM_TOKEN_PERCENT
%
Definition ast.h:406
PM_TOKEN_KEYWORD_IN
@ PM_TOKEN_KEYWORD_IN
in
Definition ast.h:274
PM_TOKEN_BANG
@ PM_TOKEN_BANG
!
Definition ast.h:61
PM_TOKEN_KEYWORD_NOT
@ PM_TOKEN_KEYWORD_NOT
not
Definition ast.h:286
PM_TOKEN_BRACKET_LEFT_ARRAY
@ PM_TOKEN_BRACKET_LEFT_ARRAY
[ for the beginning of an array
Definition ast.h:79
PM_TOKEN_HEREDOC_END
@ PM_TOKEN_HEREDOC_END
the end of a heredoc
Definition ast.h:187
PM_TOKEN_HEREDOC_START
@ PM_TOKEN_HEREDOC_START
the start of a heredoc
Definition ast.h:190
PM_TOKEN_KEYWORD_DEFINED
@ PM_TOKEN_KEYWORD_DEFINED
defined?
Definition ast.h:238
PM_TOKEN_UCOLON_COLON
@ PM_TOKEN_UCOLON_COLON
unary ::
Definition ast.h:493
PM_TOKEN_LABEL_END
@ PM_TOKEN_LABEL_END
the end of a label
Definition ast.h:358
PM_TOKEN_EQUAL_GREATER
@ PM_TOKEN_EQUAL_GREATER
=>
Definition ast.h:154
PM_TOKEN_KEYWORD_UNLESS
@ PM_TOKEN_KEYWORD_UNLESS
unless
Definition ast.h:322
PM_TOKEN_KEYWORD_ENSURE
@ PM_TOKEN_KEYWORD_ENSURE
ensure
Definition ast.h:259
PM_TOKEN_AMPERSAND_EQUAL
@ PM_TOKEN_AMPERSAND_EQUAL
&=
Definition ast.h:52
PM_TOKEN_EQUAL_EQUAL
@ PM_TOKEN_EQUAL_EQUAL
==
Definition ast.h:148
PM_TOKEN_UPLUS
@ PM_TOKEN_UPLUS
+@
Definition ast.h:508
PM_TOKEN_FLOAT_IMAGINARY
@ PM_TOKEN_FLOAT_IMAGINARY
a floating pointer number with an imaginary suffix
Definition ast.h:163
PM_TOKEN_KEYWORD_BEGIN_UPCASE
@ PM_TOKEN_KEYWORD_BEGIN_UPCASE
BEGIN.
Definition ast.h:223
PM_TOKEN_LESS_EQUAL_GREATER
@ PM_TOKEN_LESS_EQUAL_GREATER
<=>
Definition ast.h:370
PM_TOKEN_KEYWORD_RESCUE_MODIFIER
@ PM_TOKEN_KEYWORD_RESCUE_MODIFIER
rescue in the modifier form
Definition ast.h:298
PM_TOKEN_MISSING
@ PM_TOKEN_MISSING
a token that was expected but not found
Definition ast.h:34
PM_TOKEN_MINUS_GREATER
@ PM_TOKEN_MINUS_GREATER
->
Definition ast.h:388
PM_TOKEN_KEYWORD_FALSE
@ PM_TOKEN_KEYWORD_FALSE
false
Definition ast.h:262
PM_TOKEN_PIPE_PIPE_EQUAL
@ PM_TOKEN_PIPE_PIPE_EQUAL
||=
Definition ast.h:436
PM_TOKEN_KEYWORD_IF
@ PM_TOKEN_KEYWORD_IF
if
Definition ast.h:268
PM_TOKEN_EMBEXPR_BEGIN
@ PM_TOKEN_EMBEXPR_BEGIN
#{
Definition ast.h:136
PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES
@ PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES
( for a parentheses node
Definition ast.h:400
PM_TOKEN_EMBDOC_END
@ PM_TOKEN_EMBDOC_END
=end
Definition ast.h:130
PM_TOKEN_KEYWORD_ELSE
@ PM_TOKEN_KEYWORD_ELSE
else
Definition ast.h:247
PM_TOKEN_BACK_REFERENCE
@ PM_TOKEN_BACK_REFERENCE
a back reference
Definition ast.h:58
PM_TOKEN_BRACKET_LEFT
@ PM_TOKEN_BRACKET_LEFT
[
Definition ast.h:76
PM_TOKEN_EOF
@ PM_TOKEN_EOF
final token in the file
Definition ast.h:31
PM_TOKEN_PIPE_PIPE
@ PM_TOKEN_PIPE_PIPE
||
Definition ast.h:433
PM_TOKEN_KEYWORD_NIL
@ PM_TOKEN_KEYWORD_NIL
nil
Definition ast.h:283
PM_TOKEN_PERCENT_UPPER_W
@ PM_TOKEN_PERCENT_UPPER_W
W
Definition ast.h:424
PM_TOKEN_KEYWORD_RETURN
@ PM_TOKEN_KEYWORD_RETURN
return
Definition ast.h:304
PM_TOKEN_CLASS_VARIABLE
@ PM_TOKEN_CLASS_VARIABLE
a class variable
Definition ast.h:100
PM_TOKEN_PIPE
@ PM_TOKEN_PIPE
|
Definition ast.h:427
PM_TOKEN_PARENTHESIS_LEFT
@ PM_TOKEN_PARENTHESIS_LEFT
(
Definition ast.h:397
PM_TOKEN_BANG_TILDE
@ PM_TOKEN_BANG_TILDE
!
Definition ast.h:67
PM_TOKEN_DOT
@ PM_TOKEN_DOT
the .
Definition ast.h:118
PM_TOKEN_PARENTHESIS_RIGHT
@ PM_TOKEN_PARENTHESIS_RIGHT
)
Definition ast.h:403
PM_TOKEN_KEYWORD_RESCUE
@ PM_TOKEN_KEYWORD_RESCUE
rescue
Definition ast.h:295
PM_TOKEN_INSTANCE_VARIABLE
@ PM_TOKEN_INSTANCE_VARIABLE
an instance variable
Definition ast.h:199
PM_TOKEN_PIPE_EQUAL
@ PM_TOKEN_PIPE_EQUAL
|=
Definition ast.h:430
PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL
@ PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL
[]=
Definition ast.h:85
PM_TOKEN_UAMPERSAND
@ PM_TOKEN_UAMPERSAND
unary &
Definition ast.h:490
PM_TOKEN_MINUS
@ PM_TOKEN_MINUS
Definition ast.h:382
PM_TOKEN_CONSTANT
@ PM_TOKEN_CONSTANT
a constant
Definition ast.h:115
PM_TOKEN_IDENTIFIER
@ PM_TOKEN_IDENTIFIER
an identifier
Definition ast.h:193
PM_TOKEN_EMBDOC_BEGIN
@ PM_TOKEN_EMBDOC_BEGIN
=begin
Definition ast.h:127
PM_TOKEN_STAR_EQUAL
@ PM_TOKEN_STAR_EQUAL
*=
Definition ast.h:466
PM_TOKEN_KEYWORD_OR
@ PM_TOKEN_KEYWORD_OR
or
Definition ast.h:289
PM_TOKEN_KEYWORD_AND
@ PM_TOKEN_KEYWORD_AND
and
Definition ast.h:217
PM_TOKEN_LESS
@ PM_TOKEN_LESS
<
Definition ast.h:364
PM_TOKEN_KEYWORD_BREAK
@ PM_TOKEN_KEYWORD_BREAK
break
Definition ast.h:226
PM_TOKEN_PERCENT_LOWER_W
@ PM_TOKEN_PERCENT_LOWER_W
w
Definition ast.h:415
PM_TOKEN_SYMBOL_BEGIN
@ PM_TOKEN_SYMBOL_BEGIN
the beginning of a symbol
Definition ast.h:484
PM_TOKEN_METHOD_NAME
@ PM_TOKEN_METHOD_NAME
a method name
Definition ast.h:379
PM_TOKEN_KEYWORD_CASE
@ PM_TOKEN_KEYWORD_CASE
case
Definition ast.h:229
PM_TOKEN_WORDS_SEP
@ PM_TOKEN_WORDS_SEP
a separator between words in a list
Definition ast.h:517
PM_TOKEN_FLOAT_RATIONAL
@ PM_TOKEN_FLOAT_RATIONAL
a floating pointer number with a rational suffix
Definition ast.h:166
PM_TOKEN_LESS_LESS_EQUAL
@ PM_TOKEN_LESS_LESS_EQUAL
<<=
Definition ast.h:376
PM_TOKEN_EMBDOC_LINE
@ PM_TOKEN_EMBDOC_LINE
a line inside of embedded documentation
Definition ast.h:133
PM_TOKEN_KEYWORD_SUPER
@ PM_TOKEN_KEYWORD_SUPER
super
Definition ast.h:310
PM_TOKEN_KEYWORD_DO
@ PM_TOKEN_KEYWORD_DO
do
Definition ast.h:241
PM_TOKEN_KEYWORD_REDO
@ PM_TOKEN_KEYWORD_REDO
redo
Definition ast.h:292
PM_TOKEN_EQUAL_TILDE
@ PM_TOKEN_EQUAL_TILDE
=~
Definition ast.h:157
PM_TOKEN_EMBEXPR_END
@ PM_TOKEN_EMBEXPR_END
}
Definition ast.h:139
PM_TOKEN_KEYWORD_END_UPCASE
@ PM_TOKEN_KEYWORD_END_UPCASE
END.
Definition ast.h:256
PM_TOKEN_KEYWORD___LINE__
@ PM_TOKEN_KEYWORD___LINE__
LINE
Definition ast.h:352
PM_TOKEN_STRING_END
@ PM_TOKEN_STRING_END
the end of a string
Definition ast.h:481
PM_TOKEN_STRING_CONTENT
@ PM_TOKEN_STRING_CONTENT
the contents of a string
Definition ast.h:478
PM_TOKEN_BRACE_LEFT
@ PM_TOKEN_BRACE_LEFT
{
Definition ast.h:70
PM_TOKEN_COLON_COLON
@ PM_TOKEN_COLON_COLON
::
Definition ast.h:106
PM_TOKEN_GREATER_GREATER
@ PM_TOKEN_GREATER_GREATER
Definition ast.h:181
PM_TOKEN_PERCENT_LOWER_X
@ PM_TOKEN_PERCENT_LOWER_X
x
Definition ast.h:418
PM_TOKEN_KEYWORD_SELF
@ PM_TOKEN_KEYWORD_SELF
self
Definition ast.h:307
PM_TOKEN_PERCENT_LOWER_I
@ PM_TOKEN_PERCENT_LOWER_I
i
Definition ast.h:412
PM_TOKEN_KEYWORD_ALIAS
@ PM_TOKEN_KEYWORD_ALIAS
alias
Definition ast.h:214
PM_TOKEN_GLOBAL_VARIABLE
@ PM_TOKEN_GLOBAL_VARIABLE
a global variable
Definition ast.h:172
PM_TOKEN_KEYWORD_IF_MODIFIER
@ PM_TOKEN_KEYWORD_IF_MODIFIER
if in the modifier form
Definition ast.h:271
PM_TOKEN_SLASH
@ PM_TOKEN_SLASH
/
Definition ast.h:457
PM_TOKEN_KEYWORD_RETRY
@ PM_TOKEN_KEYWORD_RETRY
retry
Definition ast.h:301
PM_TOKEN_COLON
@ PM_TOKEN_COLON
:
Definition ast.h:103
PM_TOKEN_KEYWORD_UNDEF
@ PM_TOKEN_KEYWORD_UNDEF
undef
Definition ast.h:319
PM_TOKEN_BRACKET_RIGHT
@ PM_TOKEN_BRACKET_RIGHT
]
Definition ast.h:88
PM_TOKEN_KEYWORD_FOR
@ PM_TOKEN_KEYWORD_FOR
for
Definition ast.h:265
PM_TOKEN_KEYWORD_THEN
@ PM_TOKEN_KEYWORD_THEN
then
Definition ast.h:313
PM_TOKEN_QUESTION_MARK
@ PM_TOKEN_QUESTION_MARK
?
Definition ast.h:445
PM_TOKEN___END__
@ PM_TOKEN___END__
marker for the point in the file at which the parser should stop
Definition ast.h:520
PM_TOKEN_KEYWORD_WHILE
@ PM_TOKEN_KEYWORD_WHILE
while
Definition ast.h:337
PM_TOKEN_EQUAL
@ PM_TOKEN_EQUAL
=
Definition ast.h:145
PM_TOKEN_KEYWORD_DEF
@ PM_TOKEN_KEYWORD_DEF
def
Definition ast.h:235
PM_TOKEN_UDOT_DOT_DOT
@ PM_TOKEN_UDOT_DOT_DOT
unary ... operator
Definition ast.h:499
PM_TOKEN_STAR
@ PM_TOKEN_STAR
Definition ast.h:463
PM_TOKEN_KEYWORD_WHILE_MODIFIER
@ PM_TOKEN_KEYWORD_WHILE_MODIFIER
while in the modifier form
Definition ast.h:340
PM_TOKEN_KEYWORD_TRUE
@ PM_TOKEN_KEYWORD_TRUE
true
Definition ast.h:316
PM_TOKEN_BRACE_RIGHT
@ PM_TOKEN_BRACE_RIGHT
}
Definition ast.h:73
PM_TOKEN_SEMICOLON
@ PM_TOKEN_SEMICOLON
;
Definition ast.h:454
PM_TOKEN_REGEXP_BEGIN
@ PM_TOKEN_REGEXP_BEGIN
the beginning of a regular expression
Definition ast.h:448
PM_TOKEN_CARET
@ PM_TOKEN_CARET
^
Definition ast.h:91
PM_TOKEN_PERCENT_UPPER_I
@ PM_TOKEN_PERCENT_UPPER_I
I
Definition ast.h:421
PM_TOKEN_KEYWORD_DO_LOOP
@ PM_TOKEN_KEYWORD_DO_LOOP
do keyword for a predicate in a while, until, or for loop
Definition ast.h:244
PM_TOKEN_KEYWORD_MODULE
@ PM_TOKEN_KEYWORD_MODULE
module
Definition ast.h:277
PM_TOKEN_PLUS
@ PM_TOKEN_PLUS
Definition ast.h:439
PM_TOKEN_KEYWORD_NEXT
@ PM_TOKEN_KEYWORD_NEXT
next
Definition ast.h:280
PM_TOKEN_BACKTICK
@ PM_TOKEN_BACKTICK
`
Definition ast.h:55
PM_TOKEN_INTEGER_IMAGINARY
@ PM_TOKEN_INTEGER_IMAGINARY
an integer with an imaginary suffix
Definition ast.h:205
PM_TOKEN_LABEL
@ PM_TOKEN_LABEL
a label
Definition ast.h:355
PM_TOKEN_STAR_STAR_EQUAL
@ PM_TOKEN_STAR_STAR_EQUAL
**=
Definition ast.h:472
PM_TOKEN_CHARACTER_LITERAL
@ PM_TOKEN_CHARACTER_LITERAL
a character literal
Definition ast.h:97
PM_TOKEN_AMPERSAND_AMPERSAND
@ PM_TOKEN_AMPERSAND_AMPERSAND
&&
Definition ast.h:43
PM_TOKEN_UMINUS
@ PM_TOKEN_UMINUS
-@
Definition ast.h:502
PM_TOKEN_LESS_LESS
@ PM_TOKEN_LESS_LESS
<<
Definition ast.h:373
PM_TOKEN_GREATER_EQUAL
@ PM_TOKEN_GREATER_EQUAL
>=
Definition ast.h:178
PM_TOKEN_COMMENT
@ PM_TOKEN_COMMENT
a comment
Definition ast.h:112
PM_TOKEN_CARET_EQUAL
@ PM_TOKEN_CARET_EQUAL
^=
Definition ast.h:94
PM_TOKEN_KEYWORD_ELSIF
@ PM_TOKEN_KEYWORD_ELSIF
elsif
Definition ast.h:250
PM_TOKEN_STRING_BEGIN
@ PM_TOKEN_STRING_BEGIN
the beginning of a string
Definition ast.h:475
PM_TOKEN_LESS_EQUAL
@ PM_TOKEN_LESS_EQUAL
<=
Definition ast.h:367
PRISM_EXPORTED_FUNCTION
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition defines.h:50
pm_token_type_name
PRISM_EXPORTED_FUNCTION const char * pm_token_type_name(pm_token_type_t token_type)
Returns a string representation of the given token type.
Definition token_type.c:17
pm_token_type_human
const char * pm_token_type_human(pm_token_type_t token_type)
Returns the human name of the given token type.
Definition token_type.c:362