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
P
ProofScriptParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sarah.grebing
ProofScriptParser
Commits
7c6c03b2
Commit
7c6c03b2
authored
Nov 13, 2018
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix match
parent
2e39b7de
Pipeline
#32001
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/MatchEvaluator.java
.../edu/kit/iti/formal/psdbg/interpreter/MatchEvaluator.java
+8
-4
No files found.
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/MatchEvaluator.java
View file @
7c6c03b2
...
...
@@ -16,7 +16,7 @@ import java.util.Collections;
import
java.util.List
;
/**
* Evaluator specially for Expressions in a case "declaration".
* Evaluator
e
specially for Expressions in a case "declaration".
* Created by sarah on 5/22/17.
*/
public
class
MatchEvaluator
extends
DefaultASTVisitor
<
List
<
VariableAssignment
>>
implements
ScopeObservable
{
...
...
@@ -190,9 +190,13 @@ public class MatchEvaluator extends DefaultASTVisitor<List<VariableAssignment>>
public
List
<
VariableAssignment
>
visit
(
UnaryExpression
e
)
{
Operator
op
=
e
.
getOperator
();
Expression
expr
=
e
.
getExpression
();
Value
exValue
=
(
Value
)
expr
.
accept
(
this
);
Value
ret
=
op
.
evaluate
(
exValue
);
return
null
;
List
<
VariableAssignment
>
exValue
=
(
List
<
VariableAssignment
>)
expr
.
accept
(
this
);
if
(
exValue
.
isEmpty
()){
return
transformTruthValue
(
Value
.
TRUE
);
}
else
{
return
transformTruthValue
(
Value
.
FALSE
);
}
}
...
...
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