Sha256: 1b607c7ae2d3f23c6922fab93b87b2a2850e33b31463e22c7c317e7babc2062e

Contents?: true

Size: 1.13 KB

Versions: 33

Compression:

Stored size: 1.13 KB

Contents

#ifndef RBS_LOCATION_H
#define RBS_LOCATION_H

#include "ruby.h"
#include "lexer.h"

/**
 * RBS::Location class
 * */
extern VALUE RBS_Location;

typedef struct rbs_loc_list {
  ID name;
  range rg;
  struct rbs_loc_list *next;
} rbs_loc_list;

typedef struct {
  VALUE buffer;
  range rg;
  rbs_loc_list *requireds;
  rbs_loc_list *optionals;
} rbs_loc;

/**
 * Returns new RBS::Location object, with given buffer and range.
 * */
VALUE rbs_new_location(VALUE buffer, range rg);

/**
 * Return rbs_loc associated with the RBS::Location object.
 * */
rbs_loc *rbs_check_location(VALUE location);

/**
 * Add a required child range with given name.
 * */
void rbs_loc_add_required_child(rbs_loc *loc, ID name, range r);

/**
 * Add an optional child range with given name.
 * */
void rbs_loc_add_optional_child(rbs_loc *loc, ID name, range r);

/**
 * Returns RBS::Location object with start/end positions.
 *
 * @param start_pos
 * @param end_pos
 * @return New RSS::Location object.
 * */
VALUE rbs_location_pp(VALUE buffer, const position *start_pos, const position *end_pos);

/**
 * Define RBS::Location class.
 * */
void rbs__init_location();

#endif

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
rbs-3.4.4 ext/rbs_extension/location.h
rbs-3.4.3 ext/rbs_extension/location.h
rbs-3.4.2 ext/rbs_extension/location.h
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/rbs-2.8.4/ext/rbs_extension/location.h
rbs-3.4.1 ext/rbs_extension/location.h
rbs-3.4.0 ext/rbs_extension/location.h
rbs-3.4.0.pre.1 ext/rbs_extension/location.h
rbs-3.3.2 ext/rbs_extension/location.h
rbs-3.3.1 ext/rbs_extension/location.h
rbs-3.3.0 ext/rbs_extension/location.h
rbs-3.3.0.pre.2 ext/rbs_extension/location.h
rbs-3.3.0.pre.1 ext/rbs_extension/location.h
rbs-3.2.2 ext/rbs_extension/location.h
rbs-3.2.1 ext/rbs_extension/location.h
rbs-3.2.0 ext/rbs_extension/location.h
rbs-3.2.0.pre.1 ext/rbs_extension/location.h
rbs-3.1.3 ext/rbs_extension/location.h
rbs-3.1.2 ext/rbs_extension/location.h
rbs-3.1.1 ext/rbs_extension/location.h
rbs-3.1.0 ext/rbs_extension/location.h