Class ParseContext
java.lang.Object
io.github.syst3ms.skriptparser.parsing.ParseContext
An object that stores data about how an object was parsed.
By opposition to
MatchContext, this object is immutable, and generated after matching is complete.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParseContext(ParserState parserState, PatternElement element, List<MatchResult> matches, List<String> marks, String expressionString, SkriptLogger logger) -
Method Summary
Modifier and TypeMethodDescriptiongetMarks()intParses and combines all valid numerical mark into one final result by XOR-ing each match with the previous match.boolean
-
Constructor Details
-
ParseContext
public ParseContext(ParserState parserState, PatternElement element, List<MatchResult> matches, List<String> marks, String expressionString, SkriptLogger logger)
-
-
Method Details
-
getMatches
- Returns:
- all the regex that were matched
-
getElement
- Returns:
- the
PatternElementthat was successfully matched
-
getMarks
-
getNumericMark
public int getNumericMark()Parses and combines all valid numerical mark into one final result by XOR-ing each match with the previous match.- Returns:
- the numerical parse mark
-
hasMark
- Returns:
- whether the given parse mark was included when matching
-
getExpressionString
- Returns:
- the pattern element in string form
-
getParserState
-
getLogger
-