package comby-kernel

  1. Overview
  2. Docs
On This Page
  1. Environment
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Match.EnvironmentSource

Environment

A match environment maps metavariables to values for a given match.

Sourcetype t
Sourceval to_yojson : t -> Yojson.Safe.json
Sourceval of_yojson : Yojson.Safe.json -> (t, string) Core_kernel.Result.t
Sourceval create : unit -> t

create creates a new, empty environment

Sourceval vars : t -> string list

vars env returns all metavariables for this environment.

Sourceval add : ?range:range -> t -> string -> string -> t

add range env var value adds a metavariable var to env with value value and range range. If var already exists, this function has no effect and returns the existing environment.

Sourceval lookup : t -> string -> string option

lookup env ar returns the value assocated with a metavariable var.

Sourceval update : t -> string -> string -> t

update env var value updates the value of a metavariable var in env. If the metavariable does not exist, the entry is added.

Sourceval lookup_range : t -> string -> range option

lookup_range env var returns the range associated with metavariable var in env.

Sourceval update_range : t -> string -> range -> t

update_range env var value range updates env with the range associated with the value of var

Sourceval equal : t -> t -> bool
Sourceval copy : t -> t
Sourceval merge : t -> t -> t
Sourceval to_string : t -> string
Sourceval exists : t -> string -> bool