package p4spectec

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

Module P4.ContextSource

module SMap : sig ... end
Sourcetype has_params = bool
Sourcetype tid =
  1. | Empty
  2. | Local of string
  3. | Global of string
Sourcetype ident_kind =
  1. | TypeName of has_params * namespace
  2. | Ident of has_params * tid
Sourceand namespace = ident_kind SMap.t
Sourcetype t = namespace list
Sourceval context : t Stdlib.ref
Sourceval backup : t Stdlib.ref
Sourceval previous_id : string option Stdlib.ref
Sourceval parent_namespace : namespace option Stdlib.ref
Sourceval reset : unit -> unit
Sourceval declare : string -> ident_kind -> unit
Sourceval declare_type : string -> has_params -> unit
Sourceval declare_types : string list -> unit
Sourceval declare_var : ?tid:??? -> string -> has_params -> unit
Sourceval declare_vars : string list -> unit
Sourceval find_opt : string -> t -> ident_kind option
Sourceval find_type_opt : string -> t -> (has_params * namespace) option
Sourceval find_var_opt : string -> t -> (has_params * tid) option
Sourceval get_kind : string -> ident_kind
Sourceval is_typename : string -> bool
Sourceval push_scope : unit -> unit
Sourceval pop_scope : unit -> namespace
Sourceval go_toplevel : unit -> unit
Sourceval go_local : unit -> unit
Sourceval get_global_context : unit -> t
Sourceval set_type_namespace : string -> namespace -> unit
Sourceval set_parent_namespace : unit -> unit
Sourceval clear_parent_namespace : unit -> unit
Sourceval print_entry : string -> ident_kind -> unit
Sourceval print_map : ident_kind SMap.t -> unit
Sourceval print_context : unit -> unit