@Test public void testContainers_lists() throws IOException { assertThat(parse("providence", "Containers", "{\n" + " # shell comment\n" + " 'booleanList': [\n" + " # shell me\n" + " 1,\n" + " " false,\n" + " \n" + " true, 0\n" + " # shell anywhere\n" + " ];\n" + "\n" + " \n" + " \"doubleList\": [0, 0.1, 4.2e-4]\n" + " 'stringList': [\n" + " # nothing here\n" + " ]\n" + " # truly anywhere\n" + "}"), is(Containers.builder() .setBooleanList(ImmutableList.of(true, false, true, false)) .setDoubleList(ImmutableList.of(0.0, 0.1, 4.2e-4)) .setStringList(ImmutableList.of()) .build())); try { parse("providence", "list<i8>", "nope"); fail("no exception"); } catch (ParseException e) { assertThat(e.asString(), is( "Error on line 8, pos 4: Expected list start, found nope\n" + " = nope\n" + "---^^^^")); } }
public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); Object parse(InputStream inputStream, PDescriptor type); Object parse(Reader reader, PDescriptor type); }
ConstParser { public Object parse(InputStream inputStream, PDescriptor type) throws ParseException { return parse(new Utf8StreamReader(inputStream), type); } ConstParser(TypeRegistry registry,
                       String programContext,
                       int startLineNo,
                       int startLinePos); Object parse(InputStream inputStream, PDescriptor type); Object parse(Reader reader, PDescriptor type);  }