method
parse
v2_5_5 -
Show latest stable
- Class:
Ripper
parse()public
Start parsing and returns the value of the root action.
static VALUE
ripper_parse(VALUE self)
{
struct parser_params *parser;
TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
if (!ripper_initialized_p(parser)) {
rb_raise(rb_eArgError, "method called for uninitialized object");
}
if (!NIL_P(parser->parsing_thread)) {
if (parser->parsing_thread == rb_thread_current())
rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
else
rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
}
parser->parsing_thread = rb_thread_current();
rb_ensure(ripper_parse0, self, ripper_ensure, self);
return parser->result;
} Related methods
- Instance methods
- column
- encoding
- end_seen?
- error?
- filename
- lineno
- parse
- state
- yydebug
- yydebug=
- Class methods
- dedent_string
- lex
- lex_state_name
- new
- parse
- sexp
- sexp_raw
- slice
- token_match
- tokenize
- Private methods
-
_dispatch_0 -
_dispatch_1 -
_dispatch_2 -
_dispatch_3 -
_dispatch_4 -
_dispatch_5 -
_dispatch_6 -
_dispatch_7 -
compile_error -
dedent_string -
warn -
warning