Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
c29501e8
Commit
c29501e8
authored
9 years ago
by
Manos Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
More printer fixes
parent
949f28fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/leon/purescala/PrettyPrinter.scala
+15
-12
15 additions, 12 deletions
src/main/scala/leon/purescala/PrettyPrinter.scala
with
15 additions
and
12 deletions
src/main/scala/leon/purescala/PrettyPrinter.scala
+
15
−
12
View file @
c29501e8
...
...
@@ -304,15 +304,16 @@ class PrettyPrinter(opts: PrinterOptions,
}
}
case
Not
(
expr
)
=>
p
"\u00AC$expr"
case
vd
@ValDef
(
id
,
_
)
=>
vd
.
defaultValue
match
{
case
Some
(
fd
)
=>
p
"$id : ${vd.getType} = ${fd.body.get}"
case
None
=>
p
"$id : ${vd.getType}"
}
case
This
(
_
)
=>
p
"this"
case
(
tfd
:
TypedFunDef
)
=>
p
"typed def ${tfd.id}[${tfd.tps}]"
case
TypeParameterDef
(
tp
)
=>
p
"$tp"
case
TypeParameter
(
id
)
=>
p
"$id"
case
Not
(
expr
)
=>
p
"\u00AC$expr"
case
vd
@ValDef
(
id
,
_
)
=>
p
"$id : ${vd.getType}"
vd
.
defaultValue
.
foreach
{
fd
=>
p
" = ${fd.body.get}"
}
case
This
(
_
)
=>
p
"this"
case
(
tfd
:
TypedFunDef
)
=>
p
"typed def ${tfd.id}[${tfd.tps}]"
case
TypeParameterDef
(
tp
)
=>
p
"$tp"
case
TypeParameter
(
id
)
=>
p
"$id"
case
IfExpr
(
c
,
t
,
ie
:
IfExpr
)
=>
...
...
@@ -383,9 +384,9 @@ class PrettyPrinter(opts: PrinterOptions,
case
Some
(
obj
)
=>
printWithPath
(
obj
)
case
None
=>
p
"<unkown object>"
p
"<unk
n
own object>"
}
p
"(${nary(subps)})"
case
LiteralPattern
(
ob
,
lit
)
=>
...
...
@@ -421,6 +422,7 @@ class PrettyPrinter(opts: PrinterOptions,
|"""
}
p
"""|${nary(imports,"\n")}
|
|${nary(defs,"\n\n")}
|"""
...
...
@@ -470,7 +472,8 @@ class PrettyPrinter(opts: PrinterOptions,
parent
.
foreach
{
par
=>
if
(
par
.
tps
.
nonEmpty
){
p
" extends ${par.id}[${par.tps}]"
// Remember child and parents tparams are simple bijection
p
" extends ${par.id}[$tparams]"
}
else
{
p
" extends ${par.id}"
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment