/* * call-seq: * token.to_s -> token_str * * Return a string representation of the token */ static VALUE frb_token_to_s(VALUE self) { RToken *token; char *buf; GET_TK(token, self); buf = alloca(RSTRING_LEN(token->text) + 80); sprintf(buf, "token[\"%s\":%d:%d:%d]", rs2s(token->text), token->start, token->end, token->pos_inc); return rb_str_new2(buf); }