Sha256: a701fed057bd9a9b687fc2d20f7f0a7336d5ad4d9641e2cc749a531538a3ded7

Contents?: true

Size: 1.13 KB

Versions: 28

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 assiciated 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

28 entries across 28 versions & 1 rubygems

Version Path
rbs-2.8.0.pre.1 ext/rbs_extension/location.h
rbs-2.7.0 ext/rbs_extension/location.h
rbs-2.7.0.pre.3 ext/rbs_extension/location.h
rbs-2.7.0.pre.2 ext/rbs_extension/location.h
rbs-2.7.0.pre.1 ext/rbs_extension/location.h
rbs-2.6.0 ext/rbs_extension/location.h
rbs-2.5.1 ext/rbs_extension/location.h
rbs-2.5.0 ext/rbs_extension/location.h
rbs-2.4.0 ext/rbs_extension/location.h
rbs-2.3.2 ext/rbs_extension/location.h
rbs-2.3.1 ext/rbs_extension/location.h
rbs-2.3.0 ext/rbs_extension/location.h
rbs-2.2.2 ext/rbs_extension/location.h
rbs-2.2.1 ext/rbs_extension/location.h
rbs-2.2.0 ext/rbs_extension/location.h
rbs-2.1.0 ext/rbs_extension/location.h
rbs-2.0.0 ext/rbs_extension/location.h
rbs-2.0.0.pre2 ext/rbs_extension/location.h
rbs-2.0.0.pre1 ext/rbs_extension/location.h
rbs-1.8.1 ext/rbs_extension/location.h