XPathParser { protected Literal parseStringLiteral( TokenStream tokens ) { boolean removeQuotes = tokens.matches(XPathTokenizer.QUOTED_STRING); String value = tokens.consume(); if (removeQuotes) value = removeQuotes(value); return new Literal(value); } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }
@Test public void shouldParseStringLiteral() { assertThat(parser.parseStringLiteral(tokenize("one")), is(literal("one"))); assertThat(parser.parseStringLiteral(tokenize("'one'")), is(literal("one"))); assertThat(parser.parseStringLiteral(tokenize("'one word as a quote'")), is(literal("one word as a quote"))); }