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
1e3eece2
Commit
1e3eece2
authored
15 years ago
by
Philippe Suter
Browse files
Options
Downloads
Patches
Plain Diff
fixed PM trees
parent
d38069bc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/funcheck/AnalysisComponent.scala
+1
-0
1 addition, 0 deletions
src/funcheck/AnalysisComponent.scala
src/funcheck/purescala/Trees.scala
+14
-9
14 additions, 9 deletions
src/funcheck/purescala/Trees.scala
with
15 additions
and
9 deletions
src/funcheck/AnalysisComponent.scala
+
1
−
0
View file @
1e3eece2
...
@@ -66,6 +66,7 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
...
@@ -66,6 +66,7 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
tree
match
{
tree
match
{
case
c
@
ClassDef
(
mods
,
name
,
tparams
,
impl
)
=>
{
case
c
@
ClassDef
(
mods
,
name
,
tparams
,
impl
)
=>
{
val
s
=
c
.
symbol
val
s
=
c
.
symbol
println
(
s
)
println
(
s
)
if
(
s
.
isTrait
)
if
(
s
.
isTrait
)
...
...
This diff is collapsed.
Click to expand it.
src/funcheck/purescala/Trees.scala
+
14
−
9
View file @
1e3eece2
...
@@ -66,15 +66,14 @@ see examples in:
...
@@ -66,15 +66,14 @@ see examples in:
}
}
case
class
SimpleCase
(
pattern
:
Pattern
,
rhs
:
Expr
)
extends
MatchCase
case
class
SimpleCase
(
pattern
:
Pattern
,
rhs
:
Expr
)
extends
MatchCase
case
class
GuardedCase
(
pattern
:
Pattern
,
guard
:
Expr
,
rhs
:
Expr
)
extends
MatchCase
case
class
GuardedCase
(
pattern
:
Pattern
,
guard
:
Expr
,
rhs
:
Expr
)
extends
MatchCase
{
assert
(
guard
.
getType
==
BooleanType
)
}
sealed
abstract
class
Pattern
sealed
abstract
class
Pattern
// c: Class
case
class
InstanceOfPattern
(
binder
:
Option
[
Identifier
],
classTypeDef
:
ClassTypeDef
)
extends
Pattern
// c: Class
case
class
InstanceOfPattern
(
binder
:
Option
[
Identifier
],
klass
:
ClassDef
)
extends
Pattern
case
class
WildcardPattern
(
binder
:
Option
[
Identifier
])
extends
Pattern
// c @ _
// c @ Constructor(...)
case
class
ExtractorPattern
(
binder
:
Option
[
Identifier
],
subPatterns
:
Seq
[
Pattern
])
extends
Pattern
// c @ Extractor(...,...)
case
class
ConstructorPattern
(
binder
:
Option
[
Identifier
])
extends
Pattern
// c @ _
case
class
WildcardPattern
(
binder
:
Option
[
Identifier
])
extends
Pattern
// I suggest we skip Seq stars for now.
// I suggest we skip Seq stars for now.
/* Propositional logic */
/* Propositional logic */
...
@@ -240,8 +239,14 @@ see examples in:
...
@@ -240,8 +239,14 @@ see examples in:
type
VarDecls
=
Seq
[
VarDecl
]
type
VarDecls
=
Seq
[
VarDecl
]
sealed
abstract
class
Definition
(
name
:
Identifier
)
sealed
abstract
class
Definition
(
name
:
Identifier
)
case
class
CaseClassDef
(
name
:
Identifier
,
fields
:
VarDecls
)
extends
Definition
(
name
)
case
class
ClassDef
(
name
:
Identifier
,
fields
:
VarDecls
)
extends
Definition
(
name
)
/** Useful because case classes and classes are somewhat unified in some
* patterns (of pattern-matching, that is) */
trait
ClassTypeDef
case
class
CaseClassDef
(
name
:
Identifier
,
fields
:
VarDecls
)
extends
Definition
(
name
)
with
ClassTypeDef
case
class
ClassDef
(
name
:
Identifier
,
fields
:
VarDecls
)
extends
Definition
(
name
)
with
ClassTypeDef
case
class
ValDef
(
name
:
Identifier
,
value
:
Expr
)
extends
Definition
(
name
)
case
class
ValDef
(
name
:
Identifier
,
value
:
Expr
)
extends
Definition
(
name
)
case
class
FunDef
(
name
:
Identifier
,
args
:
VarDecls
,
body
:
Expr
)
extends
Definition
(
name
)
{
case
class
FunDef
(
name
:
Identifier
,
args
:
VarDecls
,
body
:
Expr
)
extends
Definition
(
name
)
{
lazy
val
argTypes
:
Seq
[
TypeTree
]
=
args
.
map
(
_
.
_2
)
lazy
val
argTypes
:
Seq
[
TypeTree
]
=
args
.
map
(
_
.
_2
)
...
...
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