@PublicApi public class Parser extends java.lang.Object
| Constructor and Description |
|---|
Parser() |
| Modifier and Type | Method and Description |
|---|---|
protected GraphqlAntlrToLanguage |
getAntlrToLanguage(org.antlr.v4.runtime.CommonTokenStream tokens,
MultiSourceReader multiSourceReader)
Allows you to override the ANTLR to AST code.
|
static Document |
parse(java.lang.String input) |
Document |
parseDocument(java.io.Reader reader) |
Document |
parseDocument(java.lang.String input) |
Document |
parseDocument(java.lang.String input,
java.lang.String sourceName) |
public static Document parse(java.lang.String input)
public Document parseDocument(java.lang.String input) throws InvalidSyntaxException
InvalidSyntaxExceptionpublic Document parseDocument(java.lang.String input, java.lang.String sourceName) throws InvalidSyntaxException
InvalidSyntaxExceptionpublic Document parseDocument(java.io.Reader reader) throws InvalidSyntaxException
InvalidSyntaxExceptionprotected GraphqlAntlrToLanguage getAntlrToLanguage(org.antlr.v4.runtime.CommonTokenStream tokens, MultiSourceReader multiSourceReader)
tokens - the toke streammultiSourceReader - the source of the query document