Package com.io7m.jsx.parser
Class JSXParser
java.lang.Object
com.io7m.jsx.parser.JSXParser
- All Implemented Interfaces:
JSXParserType
The default implementation of the
JSXParserType type.-
Method Summary
Modifier and TypeMethodDescriptionstatic JSXParserTypenewParser(JSXParserConfiguration pc, JSXLexerType lex) Construct a new parser.
-
Method Details
-
newParser
Construct a new parser.- Parameters:
pc- The parser configurationlex- A lexer- Returns:
- A new parser
-
parseExpression
- Specified by:
parseExpressionin interfaceJSXParserType- Returns:
- The next expression
- Throws:
JSXParserException- On parse errorsIOException- On I/O errors
-
parseExpressionOrEOF
- Specified by:
parseExpressionOrEOFin interfaceJSXParserType- Returns:
- The next expression, or
Optional.empty()if EOF is reached - Throws:
JSXParserException- On parse errorsIOException- On I/O errors
-
parseExpressions
- Specified by:
parseExpressionsin interfaceJSXParserType- Returns:
- All of the expressions up to EOF
- Throws:
JSXParserException- On parse errorsIOException- On I/O errors
-