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
4f1e73b9
Commit
4f1e73b9
authored
14 years ago
by
Philippe Suter
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
7f5c85e9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/funcheck/AnalysisComponent.scala
+9
-2
9 additions, 2 deletions
src/funcheck/AnalysisComponent.scala
src/funcheck/FunCheckPlugin.scala
+3
-0
3 additions, 0 deletions
src/funcheck/FunCheckPlugin.scala
with
12 additions
and
2 deletions
src/funcheck/AnalysisComponent.scala
+
9
−
2
View file @
4f1e73b9
...
...
@@ -33,8 +33,15 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
fresh
=
unit
.
fresh
val
prog
:
purescala.Definitions.Program
=
extractCode
(
unit
)
println
(
"Extracted program for "
+
unit
+
": "
)
println
(
prog
)
if
(
pluginInstance
.
stopAfterExtraction
)
{
println
(
"Extracted program for "
+
unit
+
": "
)
println
(
prog
)
println
(
"Extraction complete. Now terminating the compiler process."
)
exit
(
0
)
}
else
{
println
(
"Extracted program for "
+
unit
+
": "
)
println
(
prog
)
}
println
(
"Starting analysis."
)
val
analysis
=
new
purescala
.
Analysis
(
prog
)
...
...
This diff is collapsed.
Click to expand it.
src/funcheck/FunCheckPlugin.scala
+
3
−
0
View file @
4f1e73b9
...
...
@@ -12,11 +12,13 @@ class FunCheckPlugin(val global: Global) extends Plugin {
val
description
=
"Static analysis for Scala by LARA."
var
stopAfterAnalysis
:
Boolean
=
true
var
stopAfterExtraction
:
Boolean
=
false
/** The help message displaying the options for that plugin. */
override
val
optionsHelp
:
Option
[
String
]
=
Some
(
" -P:funcheck:uniqid When pretty-printing funcheck trees, show identifiers IDs"
+
"\n"
+
" -P:funcheck:with-code Allows the compiler to keep running after the static analysis"
+
"\n"
+
" -P:funcheck:parse Checks only whether the program is valid PureScala"
+
"\n"
+
" -P:funcheck:extensions=ex1:... Specifies a list of qualified class names of extensions to be loaded"
)
...
...
@@ -26,6 +28,7 @@ class FunCheckPlugin(val global: Global) extends Plugin {
option
match
{
case
"with-code"
=>
stopAfterAnalysis
=
false
case
"uniqid"
=>
purescala
.
Settings
.
showIDs
=
true
case
"parse"
=>
stopAfterExtraction
=
true
case
s
if
s
.
startsWith
(
"extensions="
)
=>
purescala
.
Settings
.
extensionNames
=
s
.
substring
(
"extensions="
.
length
,
s
.
length
)
case
_
=>
error
(
"Invalid option: "
+
option
)
}
...
...
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