Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
126
Issues
126
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
4ff8a6ac
Commit
4ff8a6ac
authored
Apr 12, 2019
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document + add sanitization on Ident.string_unique
parent
6fc9422e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
plugins/python/py_main.ml
plugins/python/py_main.ml
+1
-1
src/core/ident.ml
src/core/ident.ml
+1
-1
src/core/pretty.mli
src/core/pretty.mli
+6
-1
No files found.
plugins/python/py_main.ml
View file @
4ff8a6ac
...
...
@@ -338,7 +338,7 @@ let translate ~loc dl =
Typing
.
add_decl
loc
main
let
read_channel
env
path
file
c
=
let
f
=
Py_lexer
.
parse
file
c
in
let
f
:
Py_ast
.
file
=
Py_lexer
.
parse
file
c
in
Debug
.
dprintf
debug
"%s parsed successfully.@."
file
;
let
file
=
Filename
.
basename
file
in
let
file
=
Filename
.
chop_extension
file
in
...
...
src/core/ident.ml
View file @
4ff8a6ac
...
...
@@ -275,7 +275,7 @@ let id_unique printer ?(sanitizer = same) id =
Hid
.
replace
printer
.
values
id
name
;
name
let
string_unique
printer
s
=
find_unique
printer
.
indices
s
let
string_unique
printer
s
=
find_unique
printer
.
indices
(
printer
.
sanitizer
s
)
let
forget_id
printer
id
=
try
...
...
src/core/pretty.mli
View file @
4ff8a6ac
...
...
@@ -28,7 +28,7 @@ module type Printer = sig
val
tprinter
:
ident_printer
(* type symbols *)
val
aprinter
:
ident_printer
(* type variables *)
val
sprinter
:
ident_printer
(* variables and functions *)
val
pprinter
:
ident_printer
(* propoition names *)
val
pprinter
:
ident_printer
(* propo
s
ition names *)
val
forget_all
:
unit
->
unit
(* flush id_unique *)
val
forget_tvs
:
unit
->
unit
(* flush id_unique for type vars *)
...
...
@@ -93,3 +93,8 @@ include Printer
val
create
:
Ident
.
ident_printer
->
Ident
.
ident_printer
->
Ident
.
ident_printer
->
Ident
.
ident_printer
->
bool
->
(
module
Printer
)
(** `create spr apr tpr ppr forget` creates a new pretty-printing
module from the printer `spr` for variables and functions, `apr`
for type variables, `tpr` for type symbols and `ppr for proposition
names`. When the Boolean `forget` is true then all recorded names
are forgotten between printing of each tasks. *)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment