diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRLexer.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRLexer.java
index 83619c66b..671fc4021 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRLexer.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRLexer.java
@@ -146,23 +146,8 @@ public class FHIRLexer {
}
public void next() throws FHIRLexerException {
+ skipWhitespaceAndComments();
current = null;
- boolean last13 = false;
- while (cursor < source.length() && Character.isWhitespace(source.charAt(cursor))) {
- if (source.charAt(cursor) == '\r') {
- currentLocation.setLine(currentLocation.getLine() + 1);
- currentLocation.setColumn(1);
- last13 = true;
- } else if (!last13 && (source.charAt(cursor) == '\n')) {
- currentLocation.setLine(currentLocation.getLine() + 1);
- currentLocation.setColumn(1);
- last13 = false;
- } else {
- last13 = false;
- currentLocation.setColumn(currentLocation.getColumn() + 1);
- }
- cursor++;
- }
currentStart = cursor;
currentStartLocation = currentLocation;
if (cursor < source.length()) {
@@ -208,9 +193,8 @@ public class FHIRLexer {
} else if (ch == '/') {
cursor++;
if (cursor < source.length() && (source.charAt(cursor) == '/')) {
- cursor++;
- while (cursor < source.length() && !((source.charAt(cursor) == '\r') || source.charAt(cursor) == '\n'))
- cursor++;
+ // this is en error - should already have been skipped
+ error("This shoudn't happen?");
}
current = source.substring(currentStart, cursor);
} else if (ch == '$') {
@@ -297,6 +281,33 @@ public class FHIRLexer {
}
+ private void skipWhitespaceAndComments() {
+ boolean last13 = false;
+ boolean done = false;
+ while (cursor < source.length() && !done) {
+ if (cursor < source.length() -1 && "//".equals(source.substring(cursor, cursor+2))) {
+ while (cursor < source.length() && !((source.charAt(cursor) == '\r') || source.charAt(cursor) == '\n'))
+ cursor++;
+ } else if (cursor < source.length() - 1 && "/*".equals(source.substring(cursor, cursor+2))) {
+ while (cursor < source.length() - 1 && !"*/".equals(source.substring(cursor, cursor+2))) {
+ last13 = currentLocation.checkChar(source.charAt(cursor), last13);
+ cursor++;
+ }
+ if (cursor >= source.length() -1) {
+ error("Unfinished comment");
+ } else {
+ cursor = cursor + 2;
+ }
+ } else if (Character.isWhitespace(source.charAt(cursor))) {
+ last13 = currentLocation.checkChar(source.charAt(cursor), last13);
+ cursor++;
+ } else {
+ done = true;
+ }
+ }
+ }
+
+
private boolean isDateChar(char ch,int start) {
int eot = source.charAt(start+1) == 'T' ? 10 : 20;
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java
index 7bc7ec1c0..31701df2f 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java
@@ -233,7 +233,7 @@ public class FHIRPathEngine {
* @param parameters
* @return
*/
- public List executeFunction(Object appContext, String functionName, List> parameters);
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters);
/**
* Implementation of resolve() function. Passed a string, return matching resource, if one is known - else null
@@ -2858,7 +2858,7 @@ public class FHIRPathEngine {
List> params = new ArrayList>();
for (ExpressionNode p : exp.getParameters())
params.add(execute(context, focus, p, true));
- return hostServices.executeFunction(context.appInfo, exp.getName(), params);
+ return hostServices.executeFunction(context.appInfo, focus, exp.getName(), params);
}
default:
throw new Error("not Implemented yet");
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/LiquidEngine.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/LiquidEngine.java
index 008d857eb..6a307b8ca 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/LiquidEngine.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/LiquidEngine.java
@@ -405,11 +405,11 @@ public class LiquidEngine implements IEvaluationContext {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
if (externalHostServices == null)
return null;
LiquidEngineContext ctxt = (LiquidEngineContext) appContext;
- return externalHostServices.executeFunction(ctxt.externalContext, functionName, parameters);
+ return externalHostServices.executeFunction(ctxt.externalContext, focus, functionName, parameters);
}
@Override
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/StructureMapUtilities.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/StructureMapUtilities.java
index a38603abe..ae4524927 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/StructureMapUtilities.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/StructureMapUtilities.java
@@ -202,7 +202,7 @@ public class StructureMapUtilities {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
throw new Error("Not Implemented Yet");
}
diff --git a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/FHIRPathTests.java b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/FHIRPathTests.java
index 79ea4fcb0..357f8e143 100644
--- a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/FHIRPathTests.java
+++ b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/FHIRPathTests.java
@@ -64,7 +64,7 @@ public class FHIRPathTests {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
throw new NotImplementedException("Not done yet (FHIRPathTestEvaluationServices.executeFunction), when item is element");
}
diff --git a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java
index caef44031..747c66149 100644
--- a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java
+++ b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/SnapShotGenerationTests.java
@@ -316,7 +316,7 @@ public class SnapShotGenerationTests {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
if ("fixture".equals(functionName)) {
String id = fp.convertToString(parameters.get(0));
Resource res = fetchFixture(id);
diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonRenderer.java
index ceb3a3f75..43d18b3d2 100644
--- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonRenderer.java
+++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonRenderer.java
@@ -242,7 +242,7 @@ public class ComparisonRenderer implements IEvaluationContext {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
return null;
}
diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRLexer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRLexer.java
index 4400bcdc8..be10c5ba2 100644
--- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRLexer.java
+++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRLexer.java
@@ -1,5 +1,10 @@
package org.hl7.fhir.r5.utils;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringJoiner;
+
+import org.apache.poi.xssf.model.Comments;
import org.hl7.fhir.exceptions.FHIRException;
/*
@@ -34,6 +39,7 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.ExpressionNode;
+import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.SourceLocation;
import org.hl7.fhir.utilities.Utilities;
@@ -65,6 +71,7 @@ public class FHIRLexer {
private int cursor;
private int currentStart;
private String current;
+ private List comments = new ArrayList<>();
private SourceLocation currentLocation;
private SourceLocation currentStartLocation;
private int id;
@@ -146,23 +153,8 @@ public class FHIRLexer {
}
public void next() throws FHIRLexerException {
+ skipWhitespaceAndComments();
current = null;
- boolean last13 = false;
- while (cursor < source.length() && Character.isWhitespace(source.charAt(cursor))) {
- if (source.charAt(cursor) == '\r') {
- currentLocation.setLine(currentLocation.getLine() + 1);
- currentLocation.setColumn(1);
- last13 = true;
- } else if (!last13 && (source.charAt(cursor) == '\n')) {
- currentLocation.setLine(currentLocation.getLine() + 1);
- currentLocation.setColumn(1);
- last13 = false;
- } else {
- last13 = false;
- currentLocation.setColumn(currentLocation.getColumn() + 1);
- }
- cursor++;
- }
currentStart = cursor;
currentStartLocation = currentLocation;
if (cursor < source.length()) {
@@ -208,9 +200,8 @@ public class FHIRLexer {
} else if (ch == '/') {
cursor++;
if (cursor < source.length() && (source.charAt(cursor) == '/')) {
- cursor++;
- while (cursor < source.length() && !((source.charAt(cursor) == '\r') || source.charAt(cursor) == '\n'))
- cursor++;
+ // this is en error - should already have been skipped
+ error("This shoudn't happen?");
}
current = source.substring(currentStart, cursor);
} else if (ch == '$') {
@@ -296,7 +287,38 @@ public class FHIRLexer {
}
}
-
+ private void skipWhitespaceAndComments() {
+ comments.clear();
+ boolean last13 = false;
+ boolean done = false;
+ while (cursor < source.length() && !done) {
+ if (cursor < source.length() -1 && "//".equals(source.substring(cursor, cursor+2))) {
+ int start = cursor+2;
+ while (cursor < source.length() && !((source.charAt(cursor) == '\r') || source.charAt(cursor) == '\n')) {
+ cursor++;
+ }
+ comments.add(source.substring(start, cursor).trim());
+ } else if (cursor < source.length() - 1 && "/*".equals(source.substring(cursor, cursor+2))) {
+ int start = cursor+2;
+ while (cursor < source.length() - 1 && !"*/".equals(source.substring(cursor, cursor+2))) {
+ last13 = currentLocation.checkChar(source.charAt(cursor), last13);
+ cursor++;
+ }
+ if (cursor >= source.length() -1) {
+ error("Unfinished comment");
+ } else {
+ comments.add(source.substring(start, cursor).trim());
+ cursor = cursor + 2;
+ }
+ } else if (Character.isWhitespace(source.charAt(cursor))) {
+ last13 = currentLocation.checkChar(source.charAt(cursor), last13);
+ cursor++;
+ } else {
+ done = true;
+ }
+ }
+ }
+
private boolean isDateChar(char ch,int start) {
int eot = source.charAt(start+1) == 'T' ? 10 : 20;
@@ -321,9 +343,31 @@ public class FHIRLexer {
this.current = current;
}
- public boolean hasComment() {
- return !done() && current.startsWith("//");
+ public boolean hasComments() {
+ return comments.size() > 0;
}
+
+ public List getComments() {
+ return comments;
+ }
+
+ public String getAllComments() {
+ CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder("\r\n");
+ b.addAll(comments);
+ comments.clear();
+ return b.toString();
+ }
+
+ public String getFirstComment() {
+ if (hasComments()) {
+ String s = comments.get(0);
+ comments.remove(0);
+ return s;
+ } else {
+ return null;
+ }
+ }
+
public boolean hasToken(String kw) {
return !done() && kw.equals(current);
}
@@ -472,10 +516,6 @@ public class FHIRLexer {
return b.toString();
}
- void skipComments() throws FHIRLexerException {
- while (!done() && hasComment())
- next();
- }
public int getCurrentStart() {
return currentStart;
}
diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java
index 334b8648f..8edc8e9d4 100644
--- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java
+++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java
@@ -285,7 +285,7 @@ public class FHIRPathEngine {
* @param parameters
* @return
*/
- public List executeFunction(Object appContext, String functionName, List> parameters);
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters);
/**
* Implementation of resolve() function. Passed a string, return matching resource, if one is known - else null
@@ -3463,7 +3463,7 @@ public class FHIRPathEngine {
for (ExpressionNode p : exp.getParameters()) {
params.add(execute(context, focus, p, true));
}
- return hostServices.executeFunction(context.appInfo, exp.getName(), params);
+ return hostServices.executeFunction(context.appInfo, focus, exp.getName(), params);
}
default:
throw new Error("not Implemented yet");
diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java
index 31100c7bf..03dcc8b1f 100644
--- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java
+++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java
@@ -632,11 +632,11 @@ public class LiquidEngine implements IEvaluationContext {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
if (externalHostServices == null)
return null;
LiquidEngineContext ctxt = (LiquidEngineContext) appContext;
- return externalHostServices.executeFunction(ctxt.externalContext, functionName, parameters);
+ return externalHostServices.executeFunction(ctxt.externalContext, focus, functionName, parameters);
}
@Override
diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java
index 83442379c..41040413d 100644
--- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java
+++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java
@@ -202,7 +202,7 @@ public class StructureMapUtilities {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
throw new Error("Not Implemented Yet");
}
@@ -748,15 +748,12 @@ public class StructureMapUtilities {
FHIRLexer lexer = new FHIRLexer(text, srcName);
if (lexer.done())
throw lexer.error("Map Input cannot be empty");
- lexer.skipComments();
lexer.token("map");
StructureMap result = new StructureMap();
result.setUrl(lexer.readConstant("url"));
lexer.token("=");
result.setName(lexer.readConstant("name"));
- if (lexer.hasComment()) {
- result.setDescription(getMultiLineComments(lexer));
- }
+ result.setDescription(lexer.getAllComments());
while (lexer.hasToken("conceptmap"))
parseConceptMap(result, lexer);
@@ -782,7 +779,6 @@ public class StructureMapUtilities {
map.setStatus(PublicationStatus.DRAFT); // todo: how to add this to the text format
result.getContained().add(map);
lexer.token("{");
- lexer.skipComments();
// lexer.token("source");
// map.setSource(new UriType(lexer.readConstant("source")));
// lexer.token("target");
@@ -824,25 +820,11 @@ public class StructureMapUtilities {
tgt.setCode(lexer.take());
if (tgt.getCode().startsWith("\""))
tgt.setCode(lexer.processConstant(tgt.getCode()));
- if (lexer.hasComment())
- tgt.setComment(lexer.take().substring(2).trim());
+ tgt.setComment(lexer.getFirstComment());
}
lexer.token("}");
}
- private String getMultiLineComments(FHIRLexer lexer) {
- String comment = null;
- while (lexer.hasComment()) {
- String newComment = lexer.take().substring(2).trim();
- if (comment == null) {
- comment = newComment;
- } else {
- comment += "\r\n"+newComment;
- }
- }
- return comment;
- }
-
private ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) {
for (ConceptMapGroupComponent grp : map.getGroup()) {
if (grp.getSource().equals(srcs))
@@ -895,9 +877,7 @@ public class StructureMapUtilities {
lexer.token("as");
st.setMode(StructureMapModelMode.fromCode(lexer.take()));
lexer.skipToken(";");
- if (lexer.hasComment() && currentLine == lexer.getCurrentLocation().getLine()) {
- st.setDocumentation(lexer.take().substring(2).trim());
- }
+ st.setDocumentation(lexer.getFirstComment());
}
private void parseImports(StructureMap result, FHIRLexer lexer) throws FHIRException {
@@ -905,19 +885,11 @@ public class StructureMapUtilities {
int currentLine = lexer.getCurrentLocation().getLine();
result.addImport(lexer.readConstant("url"));
lexer.skipToken(";");
- if (lexer.hasComment() && currentLine == lexer.getCurrentLocation().getLine()) {
- lexer.next();
- }
+ lexer.getFirstComment();
}
private void parseGroup(StructureMap result, FHIRLexer lexer) throws FHIRException {
- String comment = null;
- if (lexer.hasComment()) {
- comment = getMultiLineComments(lexer);
- if (lexer.done()) {
- return ;
- }
- }
+ String comment = lexer.getAllComments();
lexer.token("group");
StructureMapGroupComponent group = result.addGroup();
if (comment != null) {
@@ -975,7 +947,6 @@ public class StructureMapUtilities {
parseRule(result, group.getRule(), lexer, true);
}
} else {
- lexer.skipComments();
while (lexer.hasToken("input"))
parseInput(group, lexer, false);
while (!lexer.hasToken("endgroup")) {
@@ -1003,11 +974,8 @@ public class StructureMapUtilities {
if (!newFmt) {
lexer.token("as");
input.setMode(StructureMapInputMode.fromCode(lexer.take()));
- if (lexer.hasComment()) {
- input.setDocumentation(lexer.take().substring(2).trim());
- }
+ input.setDocumentation(lexer.getFirstComment());
lexer.skipToken(";");
- lexer.skipComments();
}
}
@@ -1018,12 +986,7 @@ public class StructureMapUtilities {
lexer.token(":");
lexer.token("for");
} else {
- if (lexer.hasComment()) {
- rule.setDocumentation(this.getMultiLineComments(lexer));
- if (lexer.hasToken("}")) {
- return ; // catched a comment at the end
- }
- }
+ rule.setDocumentation(lexer.getFirstComment());
}
list.add(rule);
boolean done = false;
@@ -1062,8 +1025,9 @@ public class StructureMapUtilities {
lexer.next();
}
}
- } else if (lexer.hasComment()) {
- rule.setDocumentation(getMultiLineComments(lexer));
+ }
+ if (!rule.hasDocumentation() && lexer.hasComments()) {
+ rule.setDocumentation(lexer.getFirstComment());
}
if (isSimpleSyntax(rule)) {
rule.getSourceFirstRep().setVariable(AUTO_VAR_NAME);
diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java
index 22b3e3e21..e1518e4ef 100644
--- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java
+++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java
@@ -72,7 +72,7 @@ public class FHIRPathTests {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
throw new NotImplementedException("Not done yet (FHIRPathTestEvaluationServices.executeFunction), when item is element");
}
diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java
index d18e7dff1..135934e47 100644
--- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java
+++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java
@@ -380,7 +380,7 @@ public class SnapShotGenerationTests {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
if ("fixture".equals(functionName)) {
String id = fp.convertToString(parameters.get(0));
Resource res = fetchFixture(id);
diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SourceLocation.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SourceLocation.java
index 5ed864765..93c15dacb 100644
--- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SourceLocation.java
+++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SourceLocation.java
@@ -24,4 +24,23 @@ public class SourceLocation {
public String toString() {
return Integer.toString(line)+", "+Integer.toString(column);
}
+
+ public void newLine() {
+ setLine(getLine() + 1);
+ setColumn(1);
+ }
+ public boolean checkChar(char ch, boolean last13) {
+ if (ch == '\r') {
+ newLine();
+ return true;
+ } else if (ch == '\n') {
+ if (!last13) {
+ newLine();
+ }
+ return false;
+ } else {
+ setColumn(getColumn() + 1);
+ return false;
+ }
+ }
}
diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
index 4794d133a..e42434539 100644
--- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
+++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
@@ -226,7 +226,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
throw new Error(context.formatMessage(I18nConstants.NOT_DONE_YET_VALIDATORHOSTSERVICESEXECUTEFUNCTION));
}
diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java
index 030352c40..8b616af25 100644
--- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java
+++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java
@@ -334,7 +334,7 @@ public class SnapShotGenerationXTests {
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
if ("fixture".equals(functionName)) {
String id = fp.convertToString(parameters.get(0));
Resource res = fetchFixture(id);
diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java
index 7dc58c52c..7c8671c66 100644
--- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java
+++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java
@@ -435,7 +435,7 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
}
@Override
- public List executeFunction(Object appContext, String functionName, List> parameters) {
+ public List executeFunction(Object appContext, List focus, String functionName, List> parameters) {
return null;
}