Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public void evaluate(StringBuilder b, Base resource, LiquidEngineContext ctxt) t
break;
}
if (lctxt.globalVars.containsKey(varName)) {
throw new FHIRException(engine.getWorker().formatMessage(I18nConstants.LIQUID_VARIABLE_ALREADY_ASSIGNED, varName));
lctxt.globalVars.remove(varName);
}
lctxt.loopVars.put(varName, o);
boolean wantBreak = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,23 @@ public ExpressionNode getNode() {
}

}

/**
* Parse a path for later use using execute, but allow the path to be part of some other syntax (e.g. a Liquid expression)
*
* @param lexer
* @return
* @throws FHIRLexerException
*/
public ExpressionNodeWithOffset parsePartialExpression(FHIRLexer lexer) throws FHIRLexerException {
if (lexer.done()) {
throw lexer.error("Path cannot be empty");
}
ExpressionNode result = parseExpression(lexer, true);
result.check();
return new ExpressionNodeWithOffset(lexer.getCurrentStart(), result);
}

/**
* Parse a path for later use using execute
*
Expand Down
Loading
Loading