Skip to content

Commit

Permalink
Merge branch 'master' into highprecision
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Oct 26, 2024
2 parents 8a7e284 + a392994 commit 63aa8a9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@

package com.fujitsu.vdmj.po.expressions;

import com.fujitsu.vdmj.lex.LexLocation;
import com.fujitsu.vdmj.po.expressions.visitors.POExpressionVisitor;

public class POPreOpExpression extends POExpression
{
private static final long serialVersionUID = 1L;
public final POExpression expression;

public POPreOpExpression(POExpression expression)
public POPreOpExpression(LexLocation location, POExpression expression)
{
super(expression);
super(location);
this.expression = expression;
}

Expand Down
6 changes: 5 additions & 1 deletion vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ public void addDclLocal(TCNameToken name)

public void addOperation(LexLocation location, PODefinition called)
{
if (called.accessSpecifier.isPure)
if (called == null)
{
didUpdateState(location); // Assumed
}
else if (called.accessSpecifier.isPure)
{
return; // No updates, by definition
}
Expand Down
2 changes: 1 addition & 1 deletion vdmj/src/main/resources/tc-po.mappings
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ map TCPlusPlusExpression{left, op, right, ltype, rtype, exptype} to POPlusPlusEx
map TCPostOpExpression{location, postexpression, exptype} to POPostOpExpression(location, postexpression) set exptype;
map TCPowerSetExpression{location, exp, exptype} to POPowerSetExpression(location, exp) set exptype;
map TCPreExpression{location, function, args, exptype} to POPreExpression(location, function, args) set exptype;
map TCPreOpExpression{expression, exptype} to POPreOpExpression(expression) set exptype;
map TCPreOpExpression{location, expression, exptype} to POPreOpExpression(location, expression) set exptype;
map TCProperSubsetExpression{left, op, right, ltype, rtype, exptype} to POProperSubsetExpression(left, op, right, ltype, rtype) set exptype;
map TCQuoteLiteralExpression{type, exptype} to POQuoteLiteralExpression(type) set exptype;
map TCRangeResByExpression{left, op, right, ltype, rtype, exptype} to PORangeResByExpression(left, op, right, ltype, rtype) set exptype;
Expand Down

0 comments on commit 63aa8a9

Please sign in to comment.