@Test public void testParseFunctionInvocation_MissingEnd() { final RangeValue rangeValue = service.parseRangeValue("[date(\"2018-01-01\")..]"); assertNotNull(rangeValue); assertEquals("", rangeValue.getStartValue()); assertEquals("", rangeValue.getEndValue()); }
@Override public RangeValue parseRangeValue(final String source) { final FEEL_1_1Parser parser = makeParser(source); final BaseNode baseNode = makeVisitor().visit(parser.expression()); final RangeValue rangeValue = new RangeValue(); if (baseNode instanceof RangeNode) { final RangeNode rangeNode = (RangeNode) baseNode; rangeValue.setStartValue(parseRangeValue(rangeNode.getStart())); rangeValue.setIncludeStartValue(rangeNode.getLowerBound() == RangeNode.IntervalBoundary.CLOSED); rangeValue.setEndValue(parseRangeValue(rangeNode.getEnd())); rangeValue.setIncludeEndValue(rangeNode.getUpperBound() == RangeNode.IntervalBoundary.CLOSED); } return rangeValue; }
DMNParseServiceImpl implements DMNParseService { @Override public RangeValue parseRangeValue(final String source) { final FEEL_1_1Parser parser = makeParser(source); final BaseNode baseNode = makeVisitor().visit(parser.expression()); final RangeValue rangeValue = new RangeValue(); if (baseNode instanceof RangeNode) { final RangeNode rangeNode = (RangeNode) baseNode; rangeValue.setStartValue(parseRangeValue(rangeNode.getStart())); rangeValue.setIncludeStartValue(rangeNode.getLowerBound() == RangeNode.IntervalBoundary.CLOSED); rangeValue.setEndValue(parseRangeValue(rangeNode.getEnd())); rangeValue.setIncludeEndValue(rangeNode.getUpperBound() == RangeNode.IntervalBoundary.CLOSED); } return rangeValue; } }
DMNParseServiceImpl implements DMNParseService { @Override public RangeValue parseRangeValue(final String source) { final FEEL_1_1Parser parser = makeParser(source); final BaseNode baseNode = makeVisitor().visit(parser.expression()); final RangeValue rangeValue = new RangeValue(); if (baseNode instanceof RangeNode) { final RangeNode rangeNode = (RangeNode) baseNode; rangeValue.setStartValue(parseRangeValue(rangeNode.getStart())); rangeValue.setIncludeStartValue(rangeNode.getLowerBound() == RangeNode.IntervalBoundary.CLOSED); rangeValue.setEndValue(parseRangeValue(rangeNode.getEnd())); rangeValue.setIncludeEndValue(rangeNode.getUpperBound() == RangeNode.IntervalBoundary.CLOSED); } return rangeValue; }  }
DMNParseServiceImpl implements DMNParseService { @Override public RangeValue parseRangeValue(final String source) { final FEEL_1_1Parser parser = makeParser(source); final BaseNode baseNode = makeVisitor().visit(parser.expression()); final RangeValue rangeValue = new RangeValue(); if (baseNode instanceof RangeNode) { final RangeNode rangeNode = (RangeNode) baseNode; rangeValue.setStartValue(parseRangeValue(rangeNode.getStart())); rangeValue.setIncludeStartValue(rangeNode.getLowerBound() == RangeNode.IntervalBoundary.CLOSED); rangeValue.setEndValue(parseRangeValue(rangeNode.getEnd())); rangeValue.setIncludeEndValue(rangeNode.getUpperBound() == RangeNode.IntervalBoundary.CLOSED); } return rangeValue; }  @Override List<String> parseFEELList(final String source); @Override RangeValue parseRangeValue(final String source); }
DMNParseServiceImpl implements DMNParseService { @Override public RangeValue parseRangeValue(final String source) { final FEEL_1_1Parser parser = makeParser(source); final BaseNode baseNode = makeVisitor().visit(parser.expression()); final RangeValue rangeValue = new RangeValue(); if (baseNode instanceof RangeNode) { final RangeNode rangeNode = (RangeNode) baseNode; rangeValue.setStartValue(parseRangeValue(rangeNode.getStart())); rangeValue.setIncludeStartValue(rangeNode.getLowerBound() == RangeNode.IntervalBoundary.CLOSED); rangeValue.setEndValue(parseRangeValue(rangeNode.getEnd())); rangeValue.setIncludeEndValue(rangeNode.getUpperBound() == RangeNode.IntervalBoundary.CLOSED); } return rangeValue; }  @Override List<String> parseFEELList(final String source); @Override RangeValue parseRangeValue(final String source);  }