Sha256: b65694a2a21dbb919a38de397e402a1ae932331bc2a961667059e25f8c77f448

Contents?: true

Size: 1019 Bytes

Versions: 52

Compression:

Stored size: 1019 Bytes

Contents

#include <stdbool.h>

#include "ruby.h"
#include "ruby/re.h"
#include "ruby/encoding.h"

#include "lexer.h"
#include "parser.h"
#include "constants.h"
#include "ruby_objs.h"

/**
 * Unescape escape sequences in the given string inplace:
 *
 *   '\\n' => "\n"
 *
 * */
void rbs_unescape_string(VALUE string, bool dq_string);

/**
 * Receives `parserstate` and `range`, which represents a string token or symbol token, and returns a string VALUE.
 *
 *    Input token | Output string
 *    ------------+-------------
 *    "foo\\n"    | foo\n
 *    'foo'       | foo
 *    `bar`       | bar
 *    :"baz\\t"   | baz\t
 *    :'baz'      | baz
 * */
VALUE rbs_unquote_string(parserstate *state, range rg, int offset_bytes);

/**
 * Raises RBS::ParsingError on `tok` with message constructed with given `fmt`.
 *
 * ```
 * foo.rbs:11:21...11:25: Syntax error: {message}, token=`{tok source}` ({tok type})
 * ```
 * */
PRINTF_ARGS(NORETURN(void) raise_syntax_error(parserstate *state, token tok, const char *fmt, ...), 3, 4);

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
rbs-3.6.1 ext/rbs_extension/rbs_extension.h
rbs-3.6.0 ext/rbs_extension/rbs_extension.h
rbs-3.6.0.pre.3 ext/rbs_extension/rbs_extension.h
rbs-3.6.0.pre.2 ext/rbs_extension/rbs_extension.h
rbs-3.6.0.pre.1 ext/rbs_extension/rbs_extension.h
rbs-3.6.0.dev.1 ext/rbs_extension/rbs_extension.h
rbs-3.5.3 ext/rbs_extension/rbs_extension.h
rbs-3.5.2 ext/rbs_extension/rbs_extension.h
rbs-3.5.1 ext/rbs_extension/rbs_extension.h
rbs-3.5.1.pre.1 ext/rbs_extension/rbs_extension.h
rbs-3.5.0 ext/rbs_extension/rbs_extension.h
rbs-3.5.0.pre.2 ext/rbs_extension/rbs_extension.h
rbs-3.5.0.pre.1 ext/rbs_extension/rbs_extension.h
rbs-3.4.4 ext/rbs_extension/rbs_extension.h
rbs-3.4.3 ext/rbs_extension/rbs_extension.h
rbs-3.4.2 ext/rbs_extension/rbs_extension.h
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/rbs-2.8.4/ext/rbs_extension/rbs_extension.h
rbs-3.4.1 ext/rbs_extension/rbs_extension.h
rbs-3.4.0 ext/rbs_extension/rbs_extension.h
rbs-3.4.0.pre.1 ext/rbs_extension/rbs_extension.h