private LiquidNode parseInclude(String cnt) throws FHIRException { int i = 1; while (i < cnt.length() && !Character.isWhitespace(cnt.charAt(i))) i++; if (i == cnt.length() || i == 0) throw new FHIRException("Script "+name+": Error reading include: "+cnt); LiquidInclude res = new LiquidInclude(); res.page = cnt.substring(0, i); while (i < cnt.length() && Character.isWhitespace(cnt.charAt(i))) i++; while (i < cnt.length()) { int j = i; while (i < cnt.length() && cnt.charAt(i) != '=') i++; if (i >= cnt.length() || j == i) throw new FHIRException("Script "+name+": Error reading include: "+cnt); String n = cnt.substring(j, i); if (res.params.containsKey(n)) throw new FHIRException("Script "+name+": Error reading include: "+cnt); i++; ExpressionNodeWithOffset t = engine.parsePartial(cnt, i); i = t.getOffset(); res.params.put(n, t.getNode()); while (i < cnt.length() && Character.isWhitespace(cnt.charAt(i))) i++; } return res; }
private LiquidNode parseInclude(String cnt) throws FHIRException { int i = 1; while (i < cnt.length() && !Character.isWhitespace(cnt.charAt(i))) i++; if (i == cnt.length() || i == 0) throw new FHIRException("Script "+name+": Error reading include: "+cnt); LiquidInclude res = new LiquidInclude(); res.page = cnt.substring(0, i); while (i < cnt.length() && Character.isWhitespace(cnt.charAt(i))) i++; while (i < cnt.length()) { int j = i; while (i < cnt.length() && cnt.charAt(i) != '=') i++; if (i >= cnt.length() || j == i) throw new FHIRException("Script "+name+": Error reading include: "+cnt); String n = cnt.substring(j, i); if (res.params.containsKey(n)) throw new FHIRException("Script "+name+": Error reading include: "+cnt); i++; ExpressionNodeWithOffset t = engine.parsePartial(cnt, i); i = t.getOffset(); res.params.put(n, t.getNode()); while (i < cnt.length() && Character.isWhitespace(cnt.charAt(i))) i++; } return res; }