24 return "NOT_PROVIDED";
28 return "AMPERSAND_AMPERSAND";
30 return "AMPERSAND_AMPERSAND_EQUAL";
32 return "AMPERSAND_DOT";
34 return "AMPERSAND_EQUAL";
38 return "BACK_REFERENCE";
50 return "BRACKET_LEFT";
52 return "BRACKET_LEFT_ARRAY";
54 return "BRACKET_LEFT_RIGHT";
56 return "BRACKET_LEFT_RIGHT_EQUAL";
58 return "BRACKET_RIGHT";
64 return "CHARACTER_LITERAL";
66 return "CLASS_VARIABLE";
84 return "EMBDOC_BEGIN";
90 return "EMBEXPR_BEGIN";
100 return "EQUAL_EQUAL_EQUAL";
102 return "EQUAL_GREATER";
104 return "EQUAL_TILDE";
108 return "FLOAT_IMAGINARY";
110 return "FLOAT_RATIONAL";
112 return "FLOAT_RATIONAL_IMAGINARY";
114 return "GLOBAL_VARIABLE";
118 return "GREATER_EQUAL";
120 return "GREATER_GREATER";
122 return "GREATER_GREATER_EQUAL";
124 return "HEREDOC_END";
126 return "HEREDOC_START";
130 return "IGNORED_NEWLINE";
132 return "INSTANCE_VARIABLE";
136 return "INTEGER_IMAGINARY";
138 return "INTEGER_RATIONAL";
140 return "INTEGER_RATIONAL_IMAGINARY";
142 return "KEYWORD_ALIAS";
144 return "KEYWORD_AND";
146 return "KEYWORD_BEGIN";
148 return "KEYWORD_BEGIN_UPCASE";
150 return "KEYWORD_BREAK";
152 return "KEYWORD_CASE";
154 return "KEYWORD_CLASS";
156 return "KEYWORD_DEF";
158 return "KEYWORD_DEFINED";
162 return "KEYWORD_DO_LOOP";
164 return "KEYWORD_ELSE";
166 return "KEYWORD_ELSIF";
168 return "KEYWORD_END";
170 return "KEYWORD_END_UPCASE";
172 return "KEYWORD_ENSURE";
174 return "KEYWORD_FALSE";
176 return "KEYWORD_FOR";
180 return "KEYWORD_IF_MODIFIER";
184 return "KEYWORD_MODULE";
186 return "KEYWORD_NEXT";
188 return "KEYWORD_NIL";
190 return "KEYWORD_NOT";
194 return "KEYWORD_REDO";
196 return "KEYWORD_RESCUE";
198 return "KEYWORD_RESCUE_MODIFIER";
200 return "KEYWORD_RETRY";
202 return "KEYWORD_RETURN";
204 return "KEYWORD_SELF";
206 return "KEYWORD_SUPER";
208 return "KEYWORD_THEN";
210 return "KEYWORD_TRUE";
212 return "KEYWORD_UNDEF";
214 return "KEYWORD_UNLESS";
216 return "KEYWORD_UNLESS_MODIFIER";
218 return "KEYWORD_UNTIL";
220 return "KEYWORD_UNTIL_MODIFIER";
222 return "KEYWORD_WHEN";
224 return "KEYWORD_WHILE";
226 return "KEYWORD_WHILE_MODIFIER";
228 return "KEYWORD_YIELD";
230 return "KEYWORD___ENCODING__";
232 return "KEYWORD___FILE__";
234 return "KEYWORD___LINE__";
240 return "LAMBDA_BEGIN";
246 return "LESS_EQUAL_GREATER";
250 return "LESS_LESS_EQUAL";
252 return "METHOD_NAME";
256 return "MINUS_EQUAL";
258 return "MINUS_GREATER";
262 return "NUMBERED_REFERENCE";
264 return "PARENTHESIS_LEFT";
266 return "PARENTHESIS_LEFT_PARENTHESES";
268 return "PARENTHESIS_RIGHT";
272 return "PERCENT_EQUAL";
274 return "PERCENT_LOWER_I";
276 return "PERCENT_LOWER_W";
278 return "PERCENT_LOWER_X";
280 return "PERCENT_UPPER_I";
282 return "PERCENT_UPPER_W";
290 return "PIPE_PIPE_EQUAL";
296 return "QUESTION_MARK";
298 return "REGEXP_BEGIN";
306 return "SLASH_EQUAL";
314 return "STAR_STAR_EQUAL";
316 return "STRING_BEGIN";
318 return "STRING_CONTENT";
322 return "SYMBOL_BEGIN";
328 return "UCOLON_COLON";
332 return "UDOT_DOT_DOT";
The abstract syntax tree.
enum pm_token_type pm_token_type_t
This enum represents every type of token in the Ruby source.
@ PM_TOKEN_DOT_DOT_DOT
the ... range operator or forwarding parameter
@ PM_TOKEN_IGNORED_NEWLINE
an ignored newline
@ PM_TOKEN_KEYWORD___FILE__
FILE
@ PM_TOKEN_KEYWORD_WHEN
when
@ PM_TOKEN_FLOAT
a floating point number
@ PM_TOKEN_UDOT_DOT
unary .
@ PM_TOKEN_AMPERSAND_DOT
&.
@ PM_TOKEN_NEWLINE
a newline character outside of other tokens
@ PM_TOKEN_NUMBERED_REFERENCE
a numbered reference to a capture group in the previous regular expression match
@ PM_TOKEN_KEYWORD_YIELD
yield
@ PM_TOKEN_KEYWORD_END
end
@ PM_TOKEN_KEYWORD_UNTIL_MODIFIER
until in the modifier form
@ PM_TOKEN_EQUAL_EQUAL_EQUAL
===
@ PM_TOKEN_INTEGER_RATIONAL
an integer with a rational suffix
@ PM_TOKEN_KEYWORD___ENCODING__
ENCODING
@ PM_TOKEN_REGEXP_END
the end of a regular expression
@ PM_TOKEN_KEYWORD_UNTIL
until
@ PM_TOKEN_MAXIMUM
The maximum token value.
@ PM_TOKEN_INTEGER
an integer (any base)
@ PM_TOKEN_UMINUS_NUM
-@ for a number
@ PM_TOKEN_KEYWORD_UNLESS_MODIFIER
unless in the modifier form
@ PM_TOKEN_INTEGER_RATIONAL_IMAGINARY
an integer with a rational and imaginary suffix
@ PM_TOKEN_FLOAT_RATIONAL_IMAGINARY
a floating pointer number with a rational and imaginary suffix
@ PM_TOKEN_BRACKET_LEFT_RIGHT
[]
@ PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL
&&=
@ PM_TOKEN_KEYWORD_CLASS
class
@ PM_TOKEN_KEYWORD_BEGIN
begin
@ PM_TOKEN_NOT_PROVIDED
a token that was not present but it is okay
@ PM_TOKEN_USTAR_STAR
unary **
@ PM_TOKEN_GREATER_GREATER_EQUAL
>=
@ PM_TOKEN_PERCENT_EQUAL
%=
@ PM_TOKEN_KEYWORD_NOT
not
@ PM_TOKEN_BRACKET_LEFT_ARRAY
[ for the beginning of an array
@ PM_TOKEN_HEREDOC_END
the end of a heredoc
@ PM_TOKEN_HEREDOC_START
the start of a heredoc
@ PM_TOKEN_KEYWORD_DEFINED
defined?
@ PM_TOKEN_UCOLON_COLON
unary ::
@ PM_TOKEN_LABEL_END
the end of a label
@ PM_TOKEN_EQUAL_GREATER
=>
@ PM_TOKEN_KEYWORD_UNLESS
unless
@ PM_TOKEN_KEYWORD_ENSURE
ensure
@ PM_TOKEN_AMPERSAND_EQUAL
&=
@ PM_TOKEN_FLOAT_IMAGINARY
a floating pointer number with an imaginary suffix
@ PM_TOKEN_KEYWORD_BEGIN_UPCASE
BEGIN.
@ PM_TOKEN_LESS_EQUAL_GREATER
<=>
@ PM_TOKEN_KEYWORD_RESCUE_MODIFIER
rescue in the modifier form
@ PM_TOKEN_MISSING
a token that was expected but not found
@ PM_TOKEN_MINUS_GREATER
->
@ PM_TOKEN_KEYWORD_FALSE
false
@ PM_TOKEN_PIPE_PIPE_EQUAL
||=
@ PM_TOKEN_EMBEXPR_BEGIN
#{
@ PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES
( for a parentheses node
@ PM_TOKEN_EMBDOC_END
=end
@ PM_TOKEN_KEYWORD_ELSE
else
@ PM_TOKEN_BACK_REFERENCE
a back reference
@ PM_TOKEN_EOF
final token in the file
@ PM_TOKEN_KEYWORD_NIL
nil
@ PM_TOKEN_PERCENT_UPPER_W
W
@ PM_TOKEN_KEYWORD_RETURN
return
@ PM_TOKEN_CLASS_VARIABLE
a class variable
@ PM_TOKEN_PARENTHESIS_LEFT
(
@ PM_TOKEN_PARENTHESIS_RIGHT
)
@ PM_TOKEN_KEYWORD_RESCUE
rescue
@ PM_TOKEN_INSTANCE_VARIABLE
an instance variable
@ PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL
[]=
@ PM_TOKEN_UAMPERSAND
unary &
@ PM_TOKEN_CONSTANT
a constant
@ PM_TOKEN_IDENTIFIER
an identifier
@ PM_TOKEN_EMBDOC_BEGIN
=begin
@ PM_TOKEN_KEYWORD_AND
and
@ PM_TOKEN_KEYWORD_BREAK
break
@ PM_TOKEN_PERCENT_LOWER_W
w
@ PM_TOKEN_SYMBOL_BEGIN
the beginning of a symbol
@ PM_TOKEN_METHOD_NAME
a method name
@ PM_TOKEN_KEYWORD_CASE
case
@ PM_TOKEN_WORDS_SEP
a separator between words in a list
@ PM_TOKEN_FLOAT_RATIONAL
a floating pointer number with a rational suffix
@ PM_TOKEN_LESS_LESS_EQUAL
<<=
@ PM_TOKEN_EMBDOC_LINE
a line inside of embedded documentation
@ PM_TOKEN_KEYWORD_SUPER
super
@ PM_TOKEN_KEYWORD_REDO
redo
@ PM_TOKEN_KEYWORD_END_UPCASE
END.
@ PM_TOKEN_KEYWORD___LINE__
LINE
@ PM_TOKEN_STRING_END
the end of a string
@ PM_TOKEN_STRING_CONTENT
the contents of a string
@ PM_TOKEN_GREATER_GREATER
@ PM_TOKEN_PERCENT_LOWER_X
x
@ PM_TOKEN_KEYWORD_SELF
self
@ PM_TOKEN_PERCENT_LOWER_I
i
@ PM_TOKEN_KEYWORD_ALIAS
alias
@ PM_TOKEN_GLOBAL_VARIABLE
a global variable
@ PM_TOKEN_KEYWORD_IF_MODIFIER
if in the modifier form
@ PM_TOKEN_KEYWORD_RETRY
retry
@ PM_TOKEN_KEYWORD_UNDEF
undef
@ PM_TOKEN_BRACKET_RIGHT
]
@ PM_TOKEN_KEYWORD_FOR
for
@ PM_TOKEN_KEYWORD_THEN
then
@ PM_TOKEN_QUESTION_MARK
?
@ PM_TOKEN___END__
marker for the point in the file at which the parser should stop
@ PM_TOKEN_KEYWORD_WHILE
while
@ PM_TOKEN_KEYWORD_DEF
def
@ PM_TOKEN_UDOT_DOT_DOT
unary ... operator
@ PM_TOKEN_KEYWORD_WHILE_MODIFIER
while in the modifier form
@ PM_TOKEN_KEYWORD_TRUE
true
@ PM_TOKEN_REGEXP_BEGIN
the beginning of a regular expression
@ PM_TOKEN_PERCENT_UPPER_I
I
@ PM_TOKEN_KEYWORD_DO_LOOP
do keyword for a predicate in a while, until, or for loop
@ PM_TOKEN_KEYWORD_MODULE
module
@ PM_TOKEN_KEYWORD_NEXT
next
@ PM_TOKEN_INTEGER_IMAGINARY
an integer with an imaginary suffix
@ PM_TOKEN_STAR_STAR_EQUAL
**=
@ PM_TOKEN_CHARACTER_LITERAL
a character literal
@ PM_TOKEN_AMPERSAND_AMPERSAND
&&
@ PM_TOKEN_GREATER_EQUAL
>=
@ PM_TOKEN_COMMENT
a comment
@ PM_TOKEN_KEYWORD_ELSIF
elsif
@ PM_TOKEN_STRING_BEGIN
the beginning of a string
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
PRISM_EXPORTED_FUNCTION const char * pm_token_type_to_str(pm_token_type_t token_type)
Returns a string representation of the given token type.