Package graphql.parser
Class NodeToRuleCapturingParser
- java.lang.Object
-
- graphql.parser.Parser
-
- graphql.parser.NodeToRuleCapturingParser
-
public class NodeToRuleCapturingParser extends Parser
A parser that will capture parsing context data which can be later used for accessing tokens that are discarded during the conventional parsing process (like comments).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeToRuleCapturingParser.ParserContext
-
Field Summary
-
Fields inherited from class graphql.parser.Parser
CHANNEL_COMMENTS, CHANNEL_WHITESPACE
-
-
Constructor Summary
Constructors Constructor Description NodeToRuleCapturingParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GraphqlAntlrToLanguage
getAntlrToLanguage(org.antlr.v4.runtime.CommonTokenStream tokens, MultiSourceReader multiSourceReader, ParserEnvironment environment)
Allows you to override the ANTLR to AST code.NodeToRuleCapturingParser.ParserContext
getParserContext()
-
Methods inherited from class graphql.parser.Parser
parse, parse, parseDocument, parseDocument, parseDocument, parseDocument, parseDocument, parseDocument, parseType, parseValue
-
-
-
-
Method Detail
-
getAntlrToLanguage
protected GraphqlAntlrToLanguage getAntlrToLanguage(org.antlr.v4.runtime.CommonTokenStream tokens, MultiSourceReader multiSourceReader, ParserEnvironment environment)
Description copied from class:Parser
Allows you to override the ANTLR to AST code.- Overrides:
getAntlrToLanguage
in classParser
- Parameters:
tokens
- the token streammultiSourceReader
- the source of the query documentenvironment
- the parser environment- Returns:
- a new GraphqlAntlrToLanguage instance
-
getParserContext
public NodeToRuleCapturingParser.ParserContext getParserContext()
-
-