Skip to content
Snippets Groups Projects
Commit a4a566ac authored by Loïc Correnson's avatar Loïc Correnson Committed by Andre Maroneze
Browse files

[printer] new printer tag

parent cf225823
No related branches found
No related tags found
No related merge requests found
......@@ -576,6 +576,7 @@ KERNEL_CMO=\
src/kernel_services/abstract_interp/lmap_bitwise.cmo \
src/kernel_services/visitors/visitor.cmo \
src/kernel_services/ast_data/statuses_by_call.cmo \
src/kernel_services/ast_printing/printer_tag.cmo \
$(PLUGIN_TYPES_CMO_LIST) \
src/kernel_services/plugin_entry_points/db.cmo \
src/libraries/utils/command.cmo \
......
......@@ -502,6 +502,8 @@ src/kernel_services/ast_printing/printer.mli: CEA_LGPL
src/kernel_services/ast_printing/printer_api.mli: CEA_LGPL
src/kernel_services/ast_printing/printer_builder.ml: CEA_LGPL
src/kernel_services/ast_printing/printer_builder.mli: CEA_LGPL
src/kernel_services/ast_printing/printer_tag.ml: CEA_LGPL
src/kernel_services/ast_printing/printer_tag.mli: CEA_LGPL
src/kernel_services/ast_queries/README.md: .ignore
src/kernel_services/ast_queries/ast_info.ml: CEA_LGPL
src/kernel_services/ast_queries/ast_info.mli: CEA_LGPL
......
This diff is collapsed.
(**************************************************************************)
(* *)
(* This file is part of Frama-C. *)
(* *)
(* Copyright (C) 2007-2019 *)
(* CEA (Commissariat à l'énergie atomique et aux énergies *)
(* alternatives) *)
(* *)
(* you can redistribute it and/or modify it under the terms of the GNU *)
(* Lesser General Public License as published by the Free Software *)
(* Foundation, version 2.1. *)
(* *)
(* It is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU Lesser General Public License for more details. *)
(* *)
(* See the GNU Lesser General Public License version 2.1 *)
(* for more details (enclosed in the file licenses/LGPLv2.1). *)
(* *)
(**************************************************************************)
(** Utilities to pretty print source with located Ast elements *)
open Cil_types
(** The kind of object that can be selected in the source viewer. *)
type localizable =
| PStmt of (kernel_function * stmt)
| PStmtStart of (kernel_function * stmt)
| PLval of (kernel_function option * kinstr * lval)
| PExp of (kernel_function option * kinstr * exp)
| PTermLval of (kernel_function option * kinstr * Property.t * term_lval)
| PVDecl of (kernel_function option * kinstr * varinfo)
(** Declaration and definition of variables and function. Check the type
of the varinfo to distinguish between the various possibilities.
If the varinfo is a global or a local, the kernel_function is the
one in which the variable is declared. The [kinstr] argument is given
for local variables with an explicit initializer. *)
| PGlobal of global (** all globals but variable declarations and function
definitions. *)
| PIP of Property.t
module Localizable: Datatype.S with type t = localizable
val kf_of_localizable : localizable -> kernel_function option
val ki_of_localizable : localizable -> kinstr
val varinfo_of_localizable : localizable -> varinfo option
val loc_of_localizable : localizable -> location
(** Might return [Location.unknown] *)
module type Tag =
sig
val create : localizable -> string
end
module type S_pp =
sig
include Printer_api.S_pp
val with_unfold_precond : (stmt -> bool) ->
(Format.formatter -> 'a -> unit) ->
(Format.formatter -> 'a -> unit)
end
module Make(T : Tag) : S_pp
(* -------------------------------------------------------------------------- *)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment