@opra/client 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.min.mjs +1 -0
- package/esm/index.min.mjs +1 -0
- package/package.json +6 -19
- package/typings/client-error.d.ts +1 -1
- package/typings/http/http-client.d.ts +1 -1
- package/typings/http/http-collection-service.d.ts +1 -1
- package/typings/http/http-request.d.ts +1 -1
- package/typings/http/http-singleton-service.d.ts +1 -1
- package/typings/http/http-types.d.ts +1 -1
- package/typings/http/requests/batch-request.d.ts +1 -1
- package/typings/http/requests/collection-create-request.d.ts +1 -1
- package/typings/http/requests/collection-delete-many-request.d.ts +1 -1
- package/typings/http/requests/collection-delete-request.d.ts +1 -1
- package/typings/http/requests/collection-get-request.d.ts +1 -1
- package/typings/http/requests/collection-search-request.d.ts +1 -1
- package/typings/http/requests/collection-update-many-request.d.ts +1 -1
- package/typings/http/requests/collection-update-request.d.ts +1 -1
- package/typings/http/requests/http-singleton-get-request.d.ts +1 -1
- package/typings/interfaces/http-options.interface.d.ts +1 -1
- package/typings/interfaces/http-request-config.interface.d.ts +1 -1
- package/cjs/934.min.cjs +0 -1
- package/cjs/main.min.cjs +0 -2
- package/cjs/main.min.cjs.LICENSE.txt +0 -13
- package/esm/934.min.mjs +0 -1
- package/esm/main.min.mjs +0 -2
- package/esm/main.min.mjs.LICENSE.txt +0 -13
- package/typings/antlr4ts/ANTLRErrorListener.d.ts +0 -43
- package/typings/antlr4ts/ANTLRErrorStrategy.d.ts +0 -109
- package/typings/antlr4ts/ANTLRInputStream.d.ts +0 -51
- package/typings/antlr4ts/BailErrorStrategy.d.ts +0 -48
- package/typings/antlr4ts/BufferedTokenStream.d.ts +0 -143
- package/typings/antlr4ts/CharStream.d.ts +0 -26
- package/typings/antlr4ts/CharStreams.d.ts +0 -54
- package/typings/antlr4ts/CodePointBuffer.d.ts +0 -40
- package/typings/antlr4ts/CodePointCharStream.d.ts +0 -45
- package/typings/antlr4ts/CommonToken.d.ts +0 -116
- package/typings/antlr4ts/CommonTokenFactory.d.ts +0 -53
- package/typings/antlr4ts/CommonTokenStream.d.ts +0 -52
- package/typings/antlr4ts/ConsoleErrorListener.d.ts +0 -29
- package/typings/antlr4ts/Decorators.d.ts +0 -8
- package/typings/antlr4ts/DefaultErrorStrategy.d.ts +0 -347
- package/typings/antlr4ts/Dependents.d.ts +0 -69
- package/typings/antlr4ts/DiagnosticErrorListener.d.ts +0 -60
- package/typings/antlr4ts/FailedPredicateException.d.ts +0 -21
- package/typings/antlr4ts/InputMismatchException.d.ts +0 -14
- package/typings/antlr4ts/IntStream.d.ts +0 -197
- package/typings/antlr4ts/InterpreterRuleContext.d.ts +0 -33
- package/typings/antlr4ts/Lexer.d.ts +0 -141
- package/typings/antlr4ts/LexerInterpreter.d.ts +0 -23
- package/typings/antlr4ts/LexerNoViableAltException.d.ts +0 -19
- package/typings/antlr4ts/ListTokenSource.d.ts +0 -86
- package/typings/antlr4ts/NoViableAltException.d.ts +0 -30
- package/typings/antlr4ts/Parser.d.ts +0 -372
- package/typings/antlr4ts/ParserErrorListener.d.ts +0 -112
- package/typings/antlr4ts/ParserInterpreter.d.ts +0 -151
- package/typings/antlr4ts/ParserRuleContext.d.ts +0 -169
- package/typings/antlr4ts/ProxyErrorListener.d.ts +0 -20
- package/typings/antlr4ts/ProxyParserErrorListener.d.ts +0 -21
- package/typings/antlr4ts/RecognitionException.d.ts +0 -87
- package/typings/antlr4ts/Recognizer.d.ts +0 -101
- package/typings/antlr4ts/RuleContext.d.ts +0 -124
- package/typings/antlr4ts/RuleContextWithAltNum.d.ts +0 -22
- package/typings/antlr4ts/RuleDependency.d.ts +0 -32
- package/typings/antlr4ts/RuleVersion.d.ts +0 -11
- package/typings/antlr4ts/Token.d.ts +0 -83
- package/typings/antlr4ts/TokenFactory.d.ts +0 -23
- package/typings/antlr4ts/TokenSource.d.ts +0 -67
- package/typings/antlr4ts/TokenStream.d.ts +0 -145
- package/typings/antlr4ts/TokenStreamRewriter.d.ts +0 -216
- package/typings/antlr4ts/Vocabulary.d.ts +0 -117
- package/typings/antlr4ts/VocabularyImpl.d.ts +0 -47
- package/typings/antlr4ts/WritableToken.d.ts +0 -13
- package/typings/antlr4ts/atn/ATN.d.ts +0 -123
- package/typings/antlr4ts/atn/ATNConfig.d.ts +0 -140
- package/typings/antlr4ts/atn/ATNConfigSet.d.ts +0 -113
- package/typings/antlr4ts/atn/ATNDeserializationOptions.d.ts +0 -26
- package/typings/antlr4ts/atn/ATNDeserializer.d.ts +0 -86
- package/typings/antlr4ts/atn/ATNSimulator.d.ts +0 -28
- package/typings/antlr4ts/atn/ATNState.d.ts +0 -111
- package/typings/antlr4ts/atn/ATNStateType.d.ts +0 -19
- package/typings/antlr4ts/atn/ATNType.d.ts +0 -19
- package/typings/antlr4ts/atn/AbstractPredicateTransition.d.ts +0 -13
- package/typings/antlr4ts/atn/ActionTransition.d.ts +0 -17
- package/typings/antlr4ts/atn/AmbiguityInfo.d.ts +0 -60
- package/typings/antlr4ts/atn/AtomTransition.d.ts +0 -18
- package/typings/antlr4ts/atn/BasicBlockStartState.d.ts +0 -13
- package/typings/antlr4ts/atn/BasicState.d.ts +0 -13
- package/typings/antlr4ts/atn/BlockEndState.d.ts +0 -12
- package/typings/antlr4ts/atn/BlockStartState.d.ts +0 -10
- package/typings/antlr4ts/atn/CodePointTransitions.d.ts +0 -27
- package/typings/antlr4ts/atn/ConflictInfo.d.ts +0 -35
- package/typings/antlr4ts/atn/ContextSensitivityInfo.d.ts +0 -39
- package/typings/antlr4ts/atn/DecisionEventInfo.d.ts +0 -54
- package/typings/antlr4ts/atn/DecisionInfo.d.ts +0 -201
- package/typings/antlr4ts/atn/DecisionState.d.ts +0 -10
- package/typings/antlr4ts/atn/EpsilonTransition.d.ts +0 -24
- package/typings/antlr4ts/atn/ErrorInfo.d.ts +0 -32
- package/typings/antlr4ts/atn/InvalidState.d.ts +0 -13
- package/typings/antlr4ts/atn/LL1Analyzer.d.ts +0 -98
- package/typings/antlr4ts/atn/LexerATNSimulator.d.ts +0 -153
- package/typings/antlr4ts/atn/LexerAction.d.ts +0 -47
- package/typings/antlr4ts/atn/LexerActionExecutor.d.ts +0 -104
- package/typings/antlr4ts/atn/LexerActionType.d.ts +0 -44
- package/typings/antlr4ts/atn/LexerChannelAction.d.ts +0 -48
- package/typings/antlr4ts/atn/LexerCustomAction.d.ts +0 -73
- package/typings/antlr4ts/atn/LexerIndexedCustomAction.d.ts +0 -74
- package/typings/antlr4ts/atn/LexerModeAction.d.ts +0 -48
- package/typings/antlr4ts/atn/LexerMoreAction.d.ts +0 -47
- package/typings/antlr4ts/atn/LexerPopModeAction.d.ts +0 -47
- package/typings/antlr4ts/atn/LexerPushModeAction.d.ts +0 -48
- package/typings/antlr4ts/atn/LexerSkipAction.d.ts +0 -47
- package/typings/antlr4ts/atn/LexerTypeAction.d.ts +0 -47
- package/typings/antlr4ts/atn/LookaheadEventInfo.d.ts +0 -37
- package/typings/antlr4ts/atn/LoopEndState.d.ts +0 -11
- package/typings/antlr4ts/atn/NotSetTransition.d.ts +0 -14
- package/typings/antlr4ts/atn/OrderedATNConfigSet.d.ts +0 -23
- package/typings/antlr4ts/atn/ParseInfo.d.ts +0 -79
- package/typings/antlr4ts/atn/ParserATNSimulator.d.ts +0 -567
- package/typings/antlr4ts/atn/PlusBlockStartState.d.ts +0 -16
- package/typings/antlr4ts/atn/PlusLoopbackState.d.ts +0 -12
- package/typings/antlr4ts/atn/PrecedencePredicateTransition.d.ts +0 -21
- package/typings/antlr4ts/atn/PredicateEvalInfo.d.ts +0 -54
- package/typings/antlr4ts/atn/PredicateTransition.d.ts +0 -25
- package/typings/antlr4ts/atn/PredictionContext.d.ts +0 -89
- package/typings/antlr4ts/atn/PredictionContextCache.d.ts +0 -40
- package/typings/antlr4ts/atn/PredictionMode.d.ts +0 -89
- package/typings/antlr4ts/atn/ProfilingATNSimulator.d.ts +0 -55
- package/typings/antlr4ts/atn/RangeTransition.d.ts +0 -17
- package/typings/antlr4ts/atn/RuleStartState.d.ts +0 -13
- package/typings/antlr4ts/atn/RuleStopState.d.ts +0 -15
- package/typings/antlr4ts/atn/RuleTransition.d.ts +0 -22
- package/typings/antlr4ts/atn/SemanticContext.d.ts +0 -143
- package/typings/antlr4ts/atn/SetTransition.d.ts +0 -17
- package/typings/antlr4ts/atn/SimulatorState.d.ts +0 -17
- package/typings/antlr4ts/atn/StarBlockStartState.d.ts +0 -10
- package/typings/antlr4ts/atn/StarLoopEntryState.d.ts +0 -37
- package/typings/antlr4ts/atn/StarLoopbackState.d.ts +0 -11
- package/typings/antlr4ts/atn/TokensStartState.d.ts +0 -10
- package/typings/antlr4ts/atn/Transition.d.ts +0 -38
- package/typings/antlr4ts/atn/TransitionType.d.ts +0 -16
- package/typings/antlr4ts/atn/WildcardTransition.d.ts +0 -13
- package/typings/antlr4ts/atn/index.d.ts +0 -73
- package/typings/antlr4ts/dfa/AcceptStateInfo.d.ts +0 -33
- package/typings/antlr4ts/dfa/DFA.d.ts +0 -94
- package/typings/antlr4ts/dfa/DFASerializer.d.ts +0 -23
- package/typings/antlr4ts/dfa/DFAState.d.ts +0 -95
- package/typings/antlr4ts/dfa/LexerDFASerializer.d.ts +0 -10
- package/typings/antlr4ts/dfa/index.d.ts +0 -9
- package/typings/antlr4ts/index.d.ts +0 -49
- package/typings/antlr4ts/misc/Args.d.ts +0 -13
- package/typings/antlr4ts/misc/Array2DHashMap.d.ts +0 -20
- package/typings/antlr4ts/misc/Array2DHashSet.d.ts +0 -62
- package/typings/antlr4ts/misc/ArrayEqualityComparator.d.ts +0 -32
- package/typings/antlr4ts/misc/Arrays.d.ts +0 -18
- package/typings/antlr4ts/misc/BitSet.d.ts +0 -268
- package/typings/antlr4ts/misc/Character.d.ts +0 -7
- package/typings/antlr4ts/misc/DefaultEqualityComparator.d.ts +0 -31
- package/typings/antlr4ts/misc/EqualityComparator.d.ts +0 -29
- package/typings/antlr4ts/misc/IntSet.d.ts +0 -129
- package/typings/antlr4ts/misc/IntegerList.d.ts +0 -69
- package/typings/antlr4ts/misc/IntegerStack.d.ts +0 -15
- package/typings/antlr4ts/misc/InterpreterDataReader.d.ts +0 -39
- package/typings/antlr4ts/misc/Interval.d.ts +0 -57
- package/typings/antlr4ts/misc/IntervalSet.d.ts +0 -96
- package/typings/antlr4ts/misc/MultiMap.d.ts +0 -9
- package/typings/antlr4ts/misc/MurmurHash.d.ts +0 -45
- package/typings/antlr4ts/misc/ObjectEqualityComparator.d.ts +0 -32
- package/typings/antlr4ts/misc/ParseCancellationException.d.ts +0 -18
- package/typings/antlr4ts/misc/Stubs.d.ts +0 -31
- package/typings/antlr4ts/misc/UUID.d.ts +0 -13
- package/typings/antlr4ts/misc/Utils.d.ts +0 -15
- package/typings/antlr4ts/misc/index.d.ts +0 -25
- package/typings/antlr4ts/tree/AbstractParseTreeVisitor.d.ts +0 -103
- package/typings/antlr4ts/tree/ErrorNode.d.ts +0 -17
- package/typings/antlr4ts/tree/ParseTree.d.ts +0 -36
- package/typings/antlr4ts/tree/ParseTreeListener.d.ts +0 -26
- package/typings/antlr4ts/tree/ParseTreeProperty.d.ts +0 -28
- package/typings/antlr4ts/tree/ParseTreeVisitor.d.ts +0 -48
- package/typings/antlr4ts/tree/ParseTreeWalker.d.ts +0 -35
- package/typings/antlr4ts/tree/RuleNode.d.ts +0 -21
- package/typings/antlr4ts/tree/SyntaxTree.d.ts +0 -29
- package/typings/antlr4ts/tree/TerminalNode.d.ts +0 -27
- package/typings/antlr4ts/tree/Tree.d.ts +0 -36
- package/typings/antlr4ts/tree/Trees.d.ts +0 -75
- package/typings/antlr4ts/tree/index.d.ts +0 -16
- package/typings/antlr4ts/tree/pattern/Chunk.d.ts +0 -17
- package/typings/antlr4ts/tree/pattern/ParseTreeMatch.d.ts +0 -124
- package/typings/antlr4ts/tree/pattern/ParseTreePattern.d.ts +0 -98
- package/typings/antlr4ts/tree/pattern/ParseTreePatternMatcher.d.ts +0 -166
- package/typings/antlr4ts/tree/pattern/RuleTagToken.d.ts +0 -122
- package/typings/antlr4ts/tree/pattern/TagChunk.d.ts +0 -59
- package/typings/antlr4ts/tree/pattern/TextChunk.d.ts +0 -35
- package/typings/antlr4ts/tree/pattern/TokenTagToken.d.ts +0 -56
- package/typings/antlr4ts/tree/pattern/index.d.ts +0 -9
- package/typings/antlr4ts/tree/xpath/XPath.d.ts +0 -66
- package/typings/antlr4ts/tree/xpath/XPathElement.d.ts +0 -19
- package/typings/antlr4ts/tree/xpath/XPathLexer.d.ts +0 -36
- package/typings/antlr4ts/tree/xpath/XPathLexerErrorListener.d.ts +0 -10
- package/typings/antlr4ts/tree/xpath/XPathRuleAnywhereElement.d.ts +0 -14
- package/typings/antlr4ts/tree/xpath/XPathRuleElement.d.ts +0 -11
- package/typings/antlr4ts/tree/xpath/XPathTokenAnywhereElement.d.ts +0 -11
- package/typings/antlr4ts/tree/xpath/XPathTokenElement.d.ts +0 -11
- package/typings/antlr4ts/tree/xpath/XPathWildcardAnywhereElement.d.ts +0 -10
- package/typings/antlr4ts/tree/xpath/XPathWildcardElement.d.ts +0 -10
- package/typings/antlr4ts/tree/xpath/index.d.ts +0 -14
- package/typings/common/constants.d.ts +0 -0
- package/typings/common/exception/enums/issue-severity.enum.d.ts +0 -13
- package/typings/common/exception/error-issue.d.ts +0 -9
- package/typings/common/exception/http-errors/bad-request.error.d.ts +0 -10
- package/typings/common/exception/http-errors/failed-dependency.error.d.ts +0 -9
- package/typings/common/exception/http-errors/forbidden.error.d.ts +0 -11
- package/typings/common/exception/http-errors/internal-server.error.d.ts +0 -9
- package/typings/common/exception/http-errors/method-not-allowed.error.d.ts +0 -10
- package/typings/common/exception/http-errors/not-acceptable.error.d.ts +0 -10
- package/typings/common/exception/http-errors/not-found.error.d.ts +0 -13
- package/typings/common/exception/http-errors/unauthorized.error.d.ts +0 -10
- package/typings/common/exception/http-errors/unprocessable-entity.error.d.ts +0 -9
- package/typings/common/exception/index.d.ts +0 -15
- package/typings/common/exception/opra-exception.d.ts +0 -15
- package/typings/common/exception/resource-errors/resource-conflict.error.d.ts +0 -5
- package/typings/common/exception/resource-errors/resource-not-found.error.d.ts +0 -4
- package/typings/common/exception/wrap-exception.d.ts +0 -2
- package/typings/common/filter/antlr/OpraFilterLexer.d.ts +0 -78
- package/typings/common/filter/antlr/OpraFilterParser.d.ts +0 -365
- package/typings/common/filter/antlr/OpraFilterVisitor.d.ts +0 -290
- package/typings/common/filter/ast/abstract/ast.d.ts +0 -5
- package/typings/common/filter/ast/abstract/expression.d.ts +0 -3
- package/typings/common/filter/ast/abstract/literal.d.ts +0 -6
- package/typings/common/filter/ast/abstract/term.d.ts +0 -3
- package/typings/common/filter/ast/expressions/arithmetic-expression.d.ts +0 -13
- package/typings/common/filter/ast/expressions/array-expression.d.ts +0 -7
- package/typings/common/filter/ast/expressions/comparison-expression.d.ts +0 -10
- package/typings/common/filter/ast/expressions/logical-expression.d.ts +0 -8
- package/typings/common/filter/ast/expressions/parentheses-expression.d.ts +0 -6
- package/typings/common/filter/ast/index.d.ts +0 -16
- package/typings/common/filter/ast/terms/boolean-literal.d.ts +0 -5
- package/typings/common/filter/ast/terms/date-literal.d.ts +0 -6
- package/typings/common/filter/ast/terms/external-constant.d.ts +0 -5
- package/typings/common/filter/ast/terms/null-literal.d.ts +0 -5
- package/typings/common/filter/ast/terms/number-literal.d.ts +0 -6
- package/typings/common/filter/ast/terms/qualified-identifier.d.ts +0 -4
- package/typings/common/filter/ast/terms/string-literal.d.ts +0 -5
- package/typings/common/filter/ast/terms/time-literal.d.ts +0 -6
- package/typings/common/filter/build.d.ts +0 -31
- package/typings/common/filter/error-listener.d.ts +0 -8
- package/typings/common/filter/errors.d.ts +0 -20
- package/typings/common/filter/filter-tree-visitor.d.ts +0 -30
- package/typings/common/filter/index.d.ts +0 -5
- package/typings/common/filter/parse.d.ts +0 -2
- package/typings/common/filter/utils.d.ts +0 -2
- package/typings/common/helpers/index.d.ts +0 -1
- package/typings/common/helpers/responsive-map.d.ts +0 -18
- package/typings/common/http/enums/http-headers.enum.d.ts +0 -379
- package/typings/common/http/enums/http-status.enum.d.ts +0 -290
- package/typings/common/http/http-request.d.ts +0 -34
- package/typings/common/http/index.d.ts +0 -6
- package/typings/common/http/interfaces/client-http-headers.interface.d.ts +0 -65
- package/typings/common/http/interfaces/server-http-headers.interface.d.ts +0 -1
- package/typings/common/http/multipart/batch-multipart.d.ts +0 -31
- package/typings/common/http/multipart/http-request-content.d.ts +0 -8
- package/typings/common/http/multipart/http-response-content.d.ts +0 -7
- package/typings/common/http/multipart/index.d.ts +0 -1
- package/typings/common/http/utils/normalize-headers.d.ts +0 -1
- package/typings/common/i18n/i18n.d.ts +0 -28
- package/typings/common/i18n/index.d.ts +0 -5
- package/typings/common/i18n/string-utils.d.ts +0 -2
- package/typings/common/i18n/translate.d.ts +0 -4
- package/typings/common/index.d.ts +0 -10
- package/typings/common/schema/constants.d.ts +0 -8
- package/typings/common/schema/decorators/opr-collection-resource.decorator.d.ts +0 -8
- package/typings/common/schema/decorators/opr-complex-type.decorator.d.ts +0 -6
- package/typings/common/schema/decorators/opr-field.decorator.d.ts +0 -3
- package/typings/common/schema/decorators/opr-resolver.decorator.d.ts +0 -8
- package/typings/common/schema/decorators/opr-simple-type.decorator.d.ts +0 -6
- package/typings/common/schema/decorators/opr-singleton-resource.decorator.d.ts +0 -8
- package/typings/common/schema/implementation/data-type/builtin/any.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/base64-binary.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/bigint.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/boolean.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/date-string.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/date.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/guid.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/integer.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/number.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/object.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin/string.type.d.ts +0 -2
- package/typings/common/schema/implementation/data-type/builtin-data-types.d.ts +0 -4
- package/typings/common/schema/implementation/data-type/complex-type.d.ts +0 -29
- package/typings/common/schema/implementation/data-type/data-type.d.ts +0 -16
- package/typings/common/schema/implementation/data-type/simple-type.d.ts +0 -12
- package/typings/common/schema/implementation/data-type/union-type.d.ts +0 -16
- package/typings/common/schema/implementation/document-builder.d.ts +0 -16
- package/typings/common/schema/implementation/opra-document.d.ts +0 -44
- package/typings/common/schema/implementation/query/collection-count-query.d.ts +0 -14
- package/typings/common/schema/implementation/query/collection-create-query.d.ts +0 -18
- package/typings/common/schema/implementation/query/collection-delete-many-query.d.ts +0 -14
- package/typings/common/schema/implementation/query/collection-delete-query.d.ts +0 -10
- package/typings/common/schema/implementation/query/collection-get-query.d.ts +0 -21
- package/typings/common/schema/implementation/query/collection-search-query.d.ts +0 -30
- package/typings/common/schema/implementation/query/collection-update-many-query.d.ts +0 -15
- package/typings/common/schema/implementation/query/collection-update-query.d.ts +0 -19
- package/typings/common/schema/implementation/query/field-get-query.d.ts +0 -30
- package/typings/common/schema/implementation/query/index.d.ts +0 -27
- package/typings/common/schema/implementation/query/singleton-get-query.d.ts +0 -20
- package/typings/common/schema/implementation/resource/collection-resource-info.d.ts +0 -19
- package/typings/common/schema/implementation/resource/container-resource-info.d.ts +0 -13
- package/typings/common/schema/implementation/resource/resource-info.d.ts +0 -17
- package/typings/common/schema/implementation/resource/singleton-resource-info.d.ts +0 -14
- package/typings/common/schema/implementation/schema-builder/extract-resource-metadata.util.d.ts +0 -3
- package/typings/common/schema/implementation/schema-builder/extract-type-metadata.util.d.ts +0 -4
- package/typings/common/schema/index.d.ts +0 -25
- package/typings/common/schema/interfaces/child-field-query.interface.d.ts +0 -4
- package/typings/common/schema/interfaces/data-type.metadata.d.ts +0 -18
- package/typings/common/schema/interfaces/resource-container.interface.d.ts +0 -8
- package/typings/common/schema/interfaces/resource.metadata.d.ts +0 -18
- package/typings/common/schema/opra-schema.definition.d.ts +0 -178
- package/typings/common/schema/type-helpers/extend-type.helper.d.ts +0 -3
- package/typings/common/schema/type-helpers/mixin-type.helper.d.ts +0 -2
- package/typings/common/schema/type-helpers/mixin.utils.d.ts +0 -3
- package/typings/common/schema/types.d.ts +0 -14
- package/typings/common/schema/utils/class.utils.d.ts +0 -2
- package/typings/common/schema/utils/clone-object.util.d.ts +0 -1
- package/typings/common/schema/utils/inspect.util.d.ts +0 -4
- package/typings/common/schema/utils/normalize-field-array.util.d.ts +0 -3
- package/typings/common/schema/utils/path-to-tree.util.d.ts +0 -4
- package/typings/common/schema/utils/string-compare.util.d.ts +0 -1
- package/typings/common/url/formats/boolean-format.d.ts +0 -5
- package/typings/common/url/formats/date-format.d.ts +0 -16
- package/typings/common/url/formats/filter-format.d.ts +0 -6
- package/typings/common/url/formats/format.d.ts +0 -4
- package/typings/common/url/formats/integer-format.d.ts +0 -9
- package/typings/common/url/formats/number-format.d.ts +0 -12
- package/typings/common/url/formats/string-format.d.ts +0 -14
- package/typings/common/url/index.d.ts +0 -5
- package/typings/common/url/opra-url-path-component.d.ts +0 -15
- package/typings/common/url/opra-url-path.d.ts +0 -30
- package/typings/common/url/opra-url-search-params.d.ts +0 -44
- package/typings/common/url/opra-url.d.ts +0 -79
- package/typings/common/url/utils/path-utils.d.ts +0 -8
- package/typings/common/utils/index.d.ts +0 -3
- package/typings/common/utils/is-url.d.ts +0 -1
- package/typings/common/utils/path-to-tree.d.ts +0 -4
- package/typings/common/utils/type-guards.d.ts +0 -9
- package/umd/934.min.cjs +0 -1
- package/umd/main.min.cjs +0 -2
- package/umd/main.min.cjs.LICENSE.txt +0 -13
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
import { Interval } from "../misc/Interval";
|
|
6
|
-
import { Parser } from "../Parser";
|
|
7
|
-
import { ParseTree } from "./ParseTree";
|
|
8
|
-
import { ParseTreeVisitor } from "./ParseTreeVisitor";
|
|
9
|
-
import { RuleContext } from "../RuleContext";
|
|
10
|
-
import { RuleNode } from "./RuleNode";
|
|
11
|
-
import { Token } from "../Token";
|
|
12
|
-
export declare class TerminalNode implements ParseTree {
|
|
13
|
-
_symbol: Token;
|
|
14
|
-
_parent: RuleNode | undefined;
|
|
15
|
-
constructor(symbol: Token);
|
|
16
|
-
getChild(i: number): never;
|
|
17
|
-
get symbol(): Token;
|
|
18
|
-
get parent(): RuleNode | undefined;
|
|
19
|
-
setParent(parent: RuleContext): void;
|
|
20
|
-
get payload(): Token;
|
|
21
|
-
get sourceInterval(): Interval;
|
|
22
|
-
get childCount(): number;
|
|
23
|
-
accept<T>(visitor: ParseTreeVisitor<T>): T;
|
|
24
|
-
get text(): string;
|
|
25
|
-
toStringTree(parser?: Parser): string;
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
/** The basic notion of a tree has a parent, a payload, and a list of children.
|
|
6
|
-
* It is the most abstract interface for all the trees used by ANTLR.
|
|
7
|
-
*/
|
|
8
|
-
export interface Tree {
|
|
9
|
-
/** The parent of this node. If the return value is `undefined`, then this
|
|
10
|
-
* node is the root of the tree.
|
|
11
|
-
*/
|
|
12
|
-
readonly parent: Tree | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* This method returns whatever object represents the data at this node. For
|
|
15
|
-
* example, for parse trees, the payload can be a {@link Token} representing
|
|
16
|
-
* a leaf node or a {@link RuleContext} object representing a rule
|
|
17
|
-
* invocation. For abstract syntax trees (ASTs), this is a {@link Token}
|
|
18
|
-
* object.
|
|
19
|
-
*/
|
|
20
|
-
readonly payload: {
|
|
21
|
-
text?: string;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* If there are children, get the `i`th value indexed from 0. Throws a `RangeError` if `i` is less than zero, or
|
|
25
|
-
* greater than or equal to `childCount`.
|
|
26
|
-
*/
|
|
27
|
-
getChild(i: number): Tree;
|
|
28
|
-
/** How many children are there? If there is none, then this
|
|
29
|
-
* node represents a leaf node.
|
|
30
|
-
*/
|
|
31
|
-
readonly childCount: number;
|
|
32
|
-
/** Print out a whole tree, not just a node, in LISP format
|
|
33
|
-
* `(root child1 .. childN)`. Print just a node if this is a leaf.
|
|
34
|
-
*/
|
|
35
|
-
toStringTree(): string;
|
|
36
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
import { Parser } from "../Parser";
|
|
6
|
-
import { ParserRuleContext } from "../ParserRuleContext";
|
|
7
|
-
import { ParseTree } from "./ParseTree";
|
|
8
|
-
import { Tree } from "./Tree";
|
|
9
|
-
/** A set of utility routines useful for all kinds of ANTLR trees. */
|
|
10
|
-
export declare class Trees {
|
|
11
|
-
/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the
|
|
12
|
-
* node payloads to get the text for the nodes. Detect
|
|
13
|
-
* parse trees and extract data appropriately.
|
|
14
|
-
*/
|
|
15
|
-
static toStringTree(/*@NotNull*/ t: Tree): string;
|
|
16
|
-
/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the
|
|
17
|
-
* node payloads to get the text for the nodes. Detect
|
|
18
|
-
* parse trees and extract data appropriately.
|
|
19
|
-
*/
|
|
20
|
-
static toStringTree(/*@NotNull*/ t: Tree, recog: Parser | undefined): string;
|
|
21
|
-
/** Print out a whole tree in LISP form. {@link #getNodeText} is used on the
|
|
22
|
-
* node payloads to get the text for the nodes.
|
|
23
|
-
*/
|
|
24
|
-
static toStringTree(/*@NotNull*/ t: Tree, /*@Nullable*/ ruleNames: string[] | undefined): string;
|
|
25
|
-
static toStringTree(/*@NotNull*/ t: Tree, arg2?: Parser | string[]): string;
|
|
26
|
-
static getNodeText(/*@NotNull*/ t: Tree, recog: Parser | undefined): string;
|
|
27
|
-
static getNodeText(/*@NotNull*/ t: Tree, ruleNames: string[] | undefined): string;
|
|
28
|
-
/** Return ordered list of all children of this node */
|
|
29
|
-
static getChildren(t: ParseTree): ParseTree[];
|
|
30
|
-
static getChildren(t: Tree): Tree[];
|
|
31
|
-
/** Return a list of all ancestors of this node. The first node of
|
|
32
|
-
* list is the root and the last is the parent of this node.
|
|
33
|
-
*
|
|
34
|
-
* @since 4.5.1
|
|
35
|
-
*/
|
|
36
|
-
static getAncestors(t: ParseTree): ParseTree[];
|
|
37
|
-
static getAncestors(t: Tree): Tree[];
|
|
38
|
-
/** Return true if t is u's parent or a node on path to root from u.
|
|
39
|
-
* Use === not equals().
|
|
40
|
-
*
|
|
41
|
-
* @since 4.5.1
|
|
42
|
-
*/
|
|
43
|
-
static isAncestorOf(t: Tree, u: Tree): boolean;
|
|
44
|
-
static findAllTokenNodes(t: ParseTree, ttype: number): ParseTree[];
|
|
45
|
-
static findAllRuleNodes(t: ParseTree, ruleIndex: number): ParseTree[];
|
|
46
|
-
static findAllNodes(t: ParseTree, index: number, findTokens: boolean): ParseTree[];
|
|
47
|
-
static _findAllNodes(t: ParseTree, index: number, findTokens: boolean, nodes: ParseTree[]): void;
|
|
48
|
-
/** Get all descendents; includes t itself.
|
|
49
|
-
*
|
|
50
|
-
* @since 4.5.1
|
|
51
|
-
*/
|
|
52
|
-
static getDescendants(t: ParseTree): ParseTree[];
|
|
53
|
-
/** Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex
|
|
54
|
-
* inclusively using postorder traversal. Recursive depth-first-search.
|
|
55
|
-
*
|
|
56
|
-
* @since 4.5
|
|
57
|
-
*/
|
|
58
|
-
static getRootOfSubtreeEnclosingRegion(t: ParseTree, startTokenIndex: number, // inclusive
|
|
59
|
-
stopTokenIndex: number): ParserRuleContext | undefined;
|
|
60
|
-
/** Replace any subtree siblings of root that are completely to left
|
|
61
|
-
* or right of lookahead range with a CommonToken(Token.INVALID_TYPE,"...")
|
|
62
|
-
* node. The source interval for t is not altered to suit smaller range!
|
|
63
|
-
*
|
|
64
|
-
* WARNING: destructive to t.
|
|
65
|
-
*
|
|
66
|
-
* @since 4.5.1
|
|
67
|
-
*/
|
|
68
|
-
static stripChildrenOutOfRange(t: ParserRuleContext, root: ParserRuleContext, startIndex: number, stopIndex: number): void;
|
|
69
|
-
/** Return first node satisfying the pred
|
|
70
|
-
*
|
|
71
|
-
* @since 4.5.1
|
|
72
|
-
*/
|
|
73
|
-
static findNodeSuchThat(t: ParseTree, pred: (tree: ParseTree) => boolean): ParseTree | undefined;
|
|
74
|
-
static findNodeSuchThat(t: Tree, pred: (tree: Tree) => boolean): Tree | undefined;
|
|
75
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
export * from "./AbstractParseTreeVisitor";
|
|
6
|
-
export * from "./ErrorNode";
|
|
7
|
-
export * from "./ParseTree";
|
|
8
|
-
export * from "./ParseTreeListener";
|
|
9
|
-
export * from "./ParseTreeProperty";
|
|
10
|
-
export * from "./ParseTreeVisitor";
|
|
11
|
-
export * from "./ParseTreeWalker";
|
|
12
|
-
export * from "./RuleNode";
|
|
13
|
-
export * from "./SyntaxTree";
|
|
14
|
-
export * from "./TerminalNode";
|
|
15
|
-
export * from "./Tree";
|
|
16
|
-
export * from "./Trees";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* A chunk is either a token tag, a rule tag, or a span of literal text within a
|
|
7
|
-
* tree pattern.
|
|
8
|
-
*
|
|
9
|
-
* The method {@link ParseTreePatternMatcher#split(String)} returns a list of
|
|
10
|
-
* chunks in preparation for creating a token stream by
|
|
11
|
-
* {@link ParseTreePatternMatcher#tokenize(String)}. From there, we get a parse
|
|
12
|
-
* tree from with {@link ParseTreePatternMatcher#compile(String, int)}. These
|
|
13
|
-
* chunks are converted to {@link RuleTagToken}, {@link TokenTagToken}, or the
|
|
14
|
-
* regular tokens of the text surrounding the tags.
|
|
15
|
-
*/
|
|
16
|
-
export declare abstract class Chunk {
|
|
17
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
import { MultiMap } from "../../misc/MultiMap";
|
|
6
|
-
import { ParseTree } from "../ParseTree";
|
|
7
|
-
import { ParseTreePattern } from "./ParseTreePattern";
|
|
8
|
-
/**
|
|
9
|
-
* Represents the result of matching a {@link ParseTree} against a tree pattern.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ParseTreeMatch {
|
|
12
|
-
/**
|
|
13
|
-
* This is the backing field for `tree`.
|
|
14
|
-
*/
|
|
15
|
-
private _tree;
|
|
16
|
-
/**
|
|
17
|
-
* This is the backing field for `pattern`.
|
|
18
|
-
*/
|
|
19
|
-
private _pattern;
|
|
20
|
-
/**
|
|
21
|
-
* This is the backing field for `labels`.
|
|
22
|
-
*/
|
|
23
|
-
private _labels;
|
|
24
|
-
/**
|
|
25
|
-
* This is the backing field for `mismatchedNode`.
|
|
26
|
-
*/
|
|
27
|
-
private _mismatchedNode?;
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a new instance of {@link ParseTreeMatch} from the specified
|
|
30
|
-
* parse tree and pattern.
|
|
31
|
-
*
|
|
32
|
-
* @param tree The parse tree to match against the pattern.
|
|
33
|
-
* @param pattern The parse tree pattern.
|
|
34
|
-
* @param labels A mapping from label names to collections of
|
|
35
|
-
* {@link ParseTree} objects located by the tree pattern matching process.
|
|
36
|
-
* @param mismatchedNode The first node which failed to match the tree
|
|
37
|
-
* pattern during the matching process.
|
|
38
|
-
*
|
|
39
|
-
* @throws {@link Error} if `tree` is not defined
|
|
40
|
-
* @throws {@link Error} if `pattern` is not defined
|
|
41
|
-
* @throws {@link Error} if `labels` is not defined
|
|
42
|
-
*/
|
|
43
|
-
constructor(tree: ParseTree, pattern: ParseTreePattern, labels: MultiMap<string, ParseTree>, mismatchedNode: ParseTree | undefined);
|
|
44
|
-
/**
|
|
45
|
-
* Get the last node associated with a specific `label`.
|
|
46
|
-
*
|
|
47
|
-
* For example, for pattern `<id:ID>`, `get("id")` returns the
|
|
48
|
-
* node matched for that `ID`. If more than one node
|
|
49
|
-
* matched the specified label, only the last is returned. If there is
|
|
50
|
-
* no node associated with the label, this returns `undefined`.
|
|
51
|
-
*
|
|
52
|
-
* Pattern tags like `<ID>` and `<expr>` without labels are
|
|
53
|
-
* considered to be labeled with `ID` and `expr`, respectively.
|
|
54
|
-
*
|
|
55
|
-
* @param label The label to check.
|
|
56
|
-
*
|
|
57
|
-
* @returns The last {@link ParseTree} to match a tag with the specified
|
|
58
|
-
* label, or `undefined` if no parse tree matched a tag with the label.
|
|
59
|
-
*/
|
|
60
|
-
get(label: string): ParseTree | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Return all nodes matching a rule or token tag with the specified label.
|
|
63
|
-
*
|
|
64
|
-
* If the `label` is the name of a parser rule or token in the
|
|
65
|
-
* grammar, the resulting list will contain both the parse trees matching
|
|
66
|
-
* rule or tags explicitly labeled with the label and the complete set of
|
|
67
|
-
* parse trees matching the labeled and unlabeled tags in the pattern for
|
|
68
|
-
* the parser rule or token. For example, if `label` is `"foo"`,
|
|
69
|
-
* the result will contain *all* of the following.
|
|
70
|
-
*
|
|
71
|
-
* * Parse tree nodes matching tags of the form `<foo:anyRuleName>` and
|
|
72
|
-
* `<foo:AnyTokenName>`.
|
|
73
|
-
* * Parse tree nodes matching tags of the form `<anyLabel:foo>`.
|
|
74
|
-
* * Parse tree nodes matching tags of the form `<foo>`.
|
|
75
|
-
*
|
|
76
|
-
* @param label The label.
|
|
77
|
-
*
|
|
78
|
-
* @returns A collection of all {@link ParseTree} nodes matching tags with
|
|
79
|
-
* the specified `label`. If no nodes matched the label, an empty list
|
|
80
|
-
* is returned.
|
|
81
|
-
*/
|
|
82
|
-
getAll(label: string): ParseTree[];
|
|
83
|
-
/**
|
|
84
|
-
* Return a mapping from label → [list of nodes].
|
|
85
|
-
*
|
|
86
|
-
* The map includes special entries corresponding to the names of rules and
|
|
87
|
-
* tokens referenced in tags in the original pattern. For additional
|
|
88
|
-
* information, see the description of {@link #getAll(String)}.
|
|
89
|
-
*
|
|
90
|
-
* @returns A mapping from labels to parse tree nodes. If the parse tree
|
|
91
|
-
* pattern did not contain any rule or token tags, this map will be empty.
|
|
92
|
-
*/
|
|
93
|
-
get labels(): MultiMap<string, ParseTree>;
|
|
94
|
-
/**
|
|
95
|
-
* Get the node at which we first detected a mismatch.
|
|
96
|
-
*
|
|
97
|
-
* @returns the node at which we first detected a mismatch, or `undefined`
|
|
98
|
-
* if the match was successful.
|
|
99
|
-
*/
|
|
100
|
-
get mismatchedNode(): ParseTree | undefined;
|
|
101
|
-
/**
|
|
102
|
-
* Gets a value indicating whether the match operation succeeded.
|
|
103
|
-
*
|
|
104
|
-
* @returns `true` if the match operation succeeded; otherwise,
|
|
105
|
-
* `false`.
|
|
106
|
-
*/
|
|
107
|
-
get succeeded(): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Get the tree pattern we are matching against.
|
|
110
|
-
*
|
|
111
|
-
* @returns The tree pattern we are matching against.
|
|
112
|
-
*/
|
|
113
|
-
get pattern(): ParseTreePattern;
|
|
114
|
-
/**
|
|
115
|
-
* Get the parse tree we are trying to match to a pattern.
|
|
116
|
-
*
|
|
117
|
-
* @returns The {@link ParseTree} we are trying to match to a pattern.
|
|
118
|
-
*/
|
|
119
|
-
get tree(): ParseTree;
|
|
120
|
-
/**
|
|
121
|
-
* {@inheritDoc}
|
|
122
|
-
*/
|
|
123
|
-
toString(): string;
|
|
124
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
import { ParseTree } from "../ParseTree";
|
|
6
|
-
import { ParseTreeMatch } from "./ParseTreeMatch";
|
|
7
|
-
import { ParseTreePatternMatcher } from "./ParseTreePatternMatcher";
|
|
8
|
-
/**
|
|
9
|
-
* A pattern like `<ID> = <expr>;` converted to a {@link ParseTree} by
|
|
10
|
-
* {@link ParseTreePatternMatcher#compile(String, int)}.
|
|
11
|
-
*/
|
|
12
|
-
export declare class ParseTreePattern {
|
|
13
|
-
/**
|
|
14
|
-
* This is the backing field for `patternRuleIndex`.
|
|
15
|
-
*/
|
|
16
|
-
private _patternRuleIndex;
|
|
17
|
-
/**
|
|
18
|
-
* This is the backing field for `pattern`.
|
|
19
|
-
*/
|
|
20
|
-
private _pattern;
|
|
21
|
-
/**
|
|
22
|
-
* This is the backing field for `patternTree`.
|
|
23
|
-
*/
|
|
24
|
-
private _patternTree;
|
|
25
|
-
/**
|
|
26
|
-
* This is the backing field for `matcher`.
|
|
27
|
-
*/
|
|
28
|
-
private _matcher;
|
|
29
|
-
/**
|
|
30
|
-
* Construct a new instance of the {@link ParseTreePattern} class.
|
|
31
|
-
*
|
|
32
|
-
* @param matcher The {@link ParseTreePatternMatcher} which created this
|
|
33
|
-
* tree pattern.
|
|
34
|
-
* @param pattern The tree pattern in concrete syntax form.
|
|
35
|
-
* @param patternRuleIndex The parser rule which serves as the root of the
|
|
36
|
-
* tree pattern.
|
|
37
|
-
* @param patternTree The tree pattern in {@link ParseTree} form.
|
|
38
|
-
*/
|
|
39
|
-
constructor(matcher: ParseTreePatternMatcher, pattern: string, patternRuleIndex: number, patternTree: ParseTree);
|
|
40
|
-
/**
|
|
41
|
-
* Match a specific parse tree against this tree pattern.
|
|
42
|
-
*
|
|
43
|
-
* @param tree The parse tree to match against this tree pattern.
|
|
44
|
-
* @returns A {@link ParseTreeMatch} object describing the result of the
|
|
45
|
-
* match operation. The `ParseTreeMatch.succeeded` method can be
|
|
46
|
-
* used to determine whether or not the match was successful.
|
|
47
|
-
*/
|
|
48
|
-
match(tree: ParseTree): ParseTreeMatch;
|
|
49
|
-
/**
|
|
50
|
-
* Determine whether or not a parse tree matches this tree pattern.
|
|
51
|
-
*
|
|
52
|
-
* @param tree The parse tree to match against this tree pattern.
|
|
53
|
-
* @returns `true` if `tree` is a match for the current tree
|
|
54
|
-
* pattern; otherwise, `false`.
|
|
55
|
-
*/
|
|
56
|
-
matches(tree: ParseTree): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Find all nodes using XPath and then try to match those subtrees against
|
|
59
|
-
* this tree pattern.
|
|
60
|
-
*
|
|
61
|
-
* @param tree The {@link ParseTree} to match against this pattern.
|
|
62
|
-
* @param xpath An expression matching the nodes
|
|
63
|
-
*
|
|
64
|
-
* @returns A collection of {@link ParseTreeMatch} objects describing the
|
|
65
|
-
* successful matches. Unsuccessful matches are omitted from the result,
|
|
66
|
-
* regardless of the reason for the failure.
|
|
67
|
-
*/
|
|
68
|
-
findAll(tree: ParseTree, xpath: string): ParseTreeMatch[];
|
|
69
|
-
/**
|
|
70
|
-
* Get the {@link ParseTreePatternMatcher} which created this tree pattern.
|
|
71
|
-
*
|
|
72
|
-
* @returns The {@link ParseTreePatternMatcher} which created this tree
|
|
73
|
-
* pattern.
|
|
74
|
-
*/
|
|
75
|
-
get matcher(): ParseTreePatternMatcher;
|
|
76
|
-
/**
|
|
77
|
-
* Get the tree pattern in concrete syntax form.
|
|
78
|
-
*
|
|
79
|
-
* @returns The tree pattern in concrete syntax form.
|
|
80
|
-
*/
|
|
81
|
-
get pattern(): string;
|
|
82
|
-
/**
|
|
83
|
-
* Get the parser rule which serves as the outermost rule for the tree
|
|
84
|
-
* pattern.
|
|
85
|
-
*
|
|
86
|
-
* @returns The parser rule which serves as the outermost rule for the tree
|
|
87
|
-
* pattern.
|
|
88
|
-
*/
|
|
89
|
-
get patternRuleIndex(): number;
|
|
90
|
-
/**
|
|
91
|
-
* Get the tree pattern as a {@link ParseTree}. The rule and token tags from
|
|
92
|
-
* the pattern are present in the parse tree as terminal nodes with a symbol
|
|
93
|
-
* of type {@link RuleTagToken} or {@link TokenTagToken}.
|
|
94
|
-
*
|
|
95
|
-
* @returns The tree pattern as a {@link ParseTree}.
|
|
96
|
-
*/
|
|
97
|
-
get patternTree(): ParseTree;
|
|
98
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
import { Chunk } from "./Chunk";
|
|
6
|
-
import { Lexer } from "../../Lexer";
|
|
7
|
-
import { MultiMap } from "../../misc/MultiMap";
|
|
8
|
-
import { Parser } from "../../Parser";
|
|
9
|
-
import { ParseTree } from "../ParseTree";
|
|
10
|
-
import { ParseTreeMatch } from "./ParseTreeMatch";
|
|
11
|
-
import { ParseTreePattern } from "./ParseTreePattern";
|
|
12
|
-
import { RuleTagToken } from "./RuleTagToken";
|
|
13
|
-
import { Token } from "../../Token";
|
|
14
|
-
/**
|
|
15
|
-
* A tree pattern matching mechanism for ANTLR {@link ParseTree}s.
|
|
16
|
-
*
|
|
17
|
-
* Patterns are strings of source input text with special tags representing
|
|
18
|
-
* token or rule references such as:
|
|
19
|
-
*
|
|
20
|
-
* ```
|
|
21
|
-
* <ID> = <expr>;
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* Given a pattern start rule such as `statement`, this object constructs
|
|
25
|
-
* a {@link ParseTree} with placeholders for the `ID` and `expr`
|
|
26
|
-
* subtree. Then the {@link #match} routines can compare an actual
|
|
27
|
-
* {@link ParseTree} from a parse with this pattern. Tag `<ID>` matches
|
|
28
|
-
* any `ID` token and tag `<expr>` references the result of the
|
|
29
|
-
* `expr` rule (generally an instance of `ExprContext`.
|
|
30
|
-
*
|
|
31
|
-
* Pattern `x = 0;` is a similar pattern that matches the same pattern
|
|
32
|
-
* except that it requires the identifier to be `x` and the expression to
|
|
33
|
-
* be `0`.
|
|
34
|
-
*
|
|
35
|
-
* The {@link #matches} routines return `true` or `false` based
|
|
36
|
-
* upon a match for the tree rooted at the parameter sent in. The
|
|
37
|
-
* {@link #match} routines return a {@link ParseTreeMatch} object that
|
|
38
|
-
* contains the parse tree, the parse tree pattern, and a map from tag name to
|
|
39
|
-
* matched nodes (more below). A subtree that fails to match, returns with
|
|
40
|
-
* {@link ParseTreeMatch#mismatchedNode} set to the first tree node that did not
|
|
41
|
-
* match.
|
|
42
|
-
*
|
|
43
|
-
* For efficiency, you can compile a tree pattern in string form to a
|
|
44
|
-
* {@link ParseTreePattern} object.
|
|
45
|
-
*
|
|
46
|
-
* See `TestParseTreeMatcher` for lots of examples.
|
|
47
|
-
* {@link ParseTreePattern} has two static helper methods:
|
|
48
|
-
* {@link ParseTreePattern#findAll} and {@link ParseTreePattern#match} that
|
|
49
|
-
* are easy to use but not super efficient because they create new
|
|
50
|
-
* {@link ParseTreePatternMatcher} objects each time and have to compile the
|
|
51
|
-
* pattern in string form before using it.
|
|
52
|
-
*
|
|
53
|
-
* The lexer and parser that you pass into the {@link ParseTreePatternMatcher}
|
|
54
|
-
* constructor are used to parse the pattern in string form. The lexer converts
|
|
55
|
-
* the `<ID> = <expr>;` into a sequence of four tokens (assuming lexer
|
|
56
|
-
* throws out whitespace or puts it on a hidden channel). Be aware that the
|
|
57
|
-
* input stream is reset for the lexer (but not the parser; a
|
|
58
|
-
* {@link ParserInterpreter} is created to parse the input.). Any user-defined
|
|
59
|
-
* fields you have put into the lexer might get changed when this mechanism asks
|
|
60
|
-
* it to scan the pattern string.
|
|
61
|
-
*
|
|
62
|
-
* Normally a parser does not accept token `<expr>` as a valid
|
|
63
|
-
* `expr` but, from the parser passed in, we create a special version of
|
|
64
|
-
* the underlying grammar representation (an {@link ATN}) that allows imaginary
|
|
65
|
-
* tokens representing rules (`<expr>`) to match entire rules. We call
|
|
66
|
-
* these *bypass alternatives*.
|
|
67
|
-
*
|
|
68
|
-
* Delimiters are `<`} and `>`}, with `\` as the escape string
|
|
69
|
-
* by default, but you can set them to whatever you want using
|
|
70
|
-
* {@link #setDelimiters}. You must escape both start and stop strings
|
|
71
|
-
* `\<` and `\>`.
|
|
72
|
-
*/
|
|
73
|
-
export declare class ParseTreePatternMatcher {
|
|
74
|
-
/**
|
|
75
|
-
* This is the backing field for `lexer`.
|
|
76
|
-
*/
|
|
77
|
-
private _lexer;
|
|
78
|
-
/**
|
|
79
|
-
* This is the backing field for `parser`.
|
|
80
|
-
*/
|
|
81
|
-
private _parser;
|
|
82
|
-
protected start: string;
|
|
83
|
-
protected stop: string;
|
|
84
|
-
protected escape: string;
|
|
85
|
-
/**
|
|
86
|
-
* Regular expression corresponding to escape, for global replace
|
|
87
|
-
*/
|
|
88
|
-
protected escapeRE: RegExp;
|
|
89
|
-
/**
|
|
90
|
-
* Constructs a {@link ParseTreePatternMatcher} or from a {@link Lexer} and
|
|
91
|
-
* {@link Parser} object. The lexer input stream is altered for tokenizing
|
|
92
|
-
* the tree patterns. The parser is used as a convenient mechanism to get
|
|
93
|
-
* the grammar name, plus token, rule names.
|
|
94
|
-
*/
|
|
95
|
-
constructor(lexer: Lexer, parser: Parser);
|
|
96
|
-
/**
|
|
97
|
-
* Set the delimiters used for marking rule and token tags within concrete
|
|
98
|
-
* syntax used by the tree pattern parser.
|
|
99
|
-
*
|
|
100
|
-
* @param start The start delimiter.
|
|
101
|
-
* @param stop The stop delimiter.
|
|
102
|
-
* @param escapeLeft The escape sequence to use for escaping a start or stop delimiter.
|
|
103
|
-
*
|
|
104
|
-
* @throws {@link Error} if `start` is not defined or empty.
|
|
105
|
-
* @throws {@link Error} if `stop` is not defined or empty.
|
|
106
|
-
*/
|
|
107
|
-
setDelimiters(start: string, stop: string, escapeLeft: string): void;
|
|
108
|
-
/** Does `pattern` matched as rule `patternRuleIndex` match `tree`? */
|
|
109
|
-
matches(tree: ParseTree, pattern: string, patternRuleIndex: number): boolean;
|
|
110
|
-
/** Does `pattern` matched as rule patternRuleIndex match tree? Pass in a
|
|
111
|
-
* compiled pattern instead of a string representation of a tree pattern.
|
|
112
|
-
*/
|
|
113
|
-
matches(tree: ParseTree, pattern: ParseTreePattern): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Compare `pattern` matched as rule `patternRuleIndex` against
|
|
116
|
-
* `tree` and return a {@link ParseTreeMatch} object that contains the
|
|
117
|
-
* matched elements, or the node at which the match failed.
|
|
118
|
-
*/
|
|
119
|
-
match(tree: ParseTree, pattern: string, patternRuleIndex: number): ParseTreeMatch;
|
|
120
|
-
/**
|
|
121
|
-
* Compare `pattern` matched against `tree` and return a
|
|
122
|
-
* {@link ParseTreeMatch} object that contains the matched elements, or the
|
|
123
|
-
* node at which the match failed. Pass in a compiled pattern instead of a
|
|
124
|
-
* string representation of a tree pattern.
|
|
125
|
-
*/
|
|
126
|
-
match(tree: ParseTree, pattern: ParseTreePattern): ParseTreeMatch;
|
|
127
|
-
/**
|
|
128
|
-
* For repeated use of a tree pattern, compile it to a
|
|
129
|
-
* {@link ParseTreePattern} using this method.
|
|
130
|
-
*/
|
|
131
|
-
compile(pattern: string, patternRuleIndex: number): ParseTreePattern;
|
|
132
|
-
/**
|
|
133
|
-
* Used to convert the tree pattern string into a series of tokens. The
|
|
134
|
-
* input stream is reset.
|
|
135
|
-
*/
|
|
136
|
-
get lexer(): Lexer;
|
|
137
|
-
/**
|
|
138
|
-
* Used to collect to the grammar file name, token names, rule names for
|
|
139
|
-
* used to parse the pattern into a parse tree.
|
|
140
|
-
*/
|
|
141
|
-
get parser(): Parser;
|
|
142
|
-
/**
|
|
143
|
-
* Recursively walk `tree` against `patternTree`, filling
|
|
144
|
-
* `match.`{@link ParseTreeMatch#labels labels}.
|
|
145
|
-
*
|
|
146
|
-
* @returns the first node encountered in `tree` which does not match
|
|
147
|
-
* a corresponding node in `patternTree`, or `undefined` if the match
|
|
148
|
-
* was successful. The specific node returned depends on the matching
|
|
149
|
-
* algorithm used by the implementation, and may be overridden.
|
|
150
|
-
*/
|
|
151
|
-
protected matchImpl(tree: ParseTree, patternTree: ParseTree, labels: MultiMap<string, ParseTree>): ParseTree | undefined;
|
|
152
|
-
/** Is `t` `(expr <expr>)` subtree? */
|
|
153
|
-
protected getRuleTagToken(t: ParseTree): RuleTagToken | undefined;
|
|
154
|
-
tokenize(pattern: string): Token[];
|
|
155
|
-
/** Split `<ID> = <e:expr> ;` into 4 chunks for tokenizing by {@link #tokenize}. */
|
|
156
|
-
split(pattern: string): Chunk[];
|
|
157
|
-
}
|
|
158
|
-
export declare namespace ParseTreePatternMatcher {
|
|
159
|
-
class CannotInvokeStartRule extends Error {
|
|
160
|
-
error: Error;
|
|
161
|
-
constructor(error: Error);
|
|
162
|
-
}
|
|
163
|
-
class StartRuleDoesNotConsumeFullPattern extends Error {
|
|
164
|
-
constructor();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/
|
|
5
|
-
import { CharStream } from "../../CharStream";
|
|
6
|
-
import { Token } from "../../Token";
|
|
7
|
-
import { TokenSource } from "../../TokenSource";
|
|
8
|
-
/**
|
|
9
|
-
* A {@link Token} object representing an entire subtree matched by a parser
|
|
10
|
-
* rule; e.g., `<expr>`. These tokens are created for {@link TagChunk}
|
|
11
|
-
* chunks where the tag corresponds to a parser rule.
|
|
12
|
-
*/
|
|
13
|
-
export declare class RuleTagToken implements Token {
|
|
14
|
-
/**
|
|
15
|
-
* This is the backing field for `ruleName`.
|
|
16
|
-
*/
|
|
17
|
-
private _ruleName;
|
|
18
|
-
/**
|
|
19
|
-
* The token type for the current token. This is the token type assigned to
|
|
20
|
-
* the bypass alternative for the rule during ATN deserialization.
|
|
21
|
-
*/
|
|
22
|
-
private bypassTokenType;
|
|
23
|
-
/**
|
|
24
|
-
* This is the backing field for `label`.
|
|
25
|
-
*/
|
|
26
|
-
private _label?;
|
|
27
|
-
/**
|
|
28
|
-
* Constructs a new instance of {@link RuleTagToken} with the specified rule
|
|
29
|
-
* name, bypass token type, and label.
|
|
30
|
-
*
|
|
31
|
-
* @param ruleName The name of the parser rule this rule tag matches.
|
|
32
|
-
* @param bypassTokenType The bypass token type assigned to the parser rule.
|
|
33
|
-
* @param label The label associated with the rule tag, or `undefined` if
|
|
34
|
-
* the rule tag is unlabeled.
|
|
35
|
-
*
|
|
36
|
-
* @exception IllegalArgumentException if `ruleName` is not defined
|
|
37
|
-
* or empty.
|
|
38
|
-
*/
|
|
39
|
-
constructor(ruleName: string, bypassTokenType: number, label?: string);
|
|
40
|
-
/**
|
|
41
|
-
* Gets the name of the rule associated with this rule tag.
|
|
42
|
-
*
|
|
43
|
-
* @returns The name of the parser rule associated with this rule tag.
|
|
44
|
-
*/
|
|
45
|
-
get ruleName(): string;
|
|
46
|
-
/**
|
|
47
|
-
* Gets the label associated with the rule tag.
|
|
48
|
-
*
|
|
49
|
-
* @returns The name of the label associated with the rule tag, or
|
|
50
|
-
* `undefined` if this is an unlabeled rule tag.
|
|
51
|
-
*/
|
|
52
|
-
get label(): string | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* {@inheritDoc}
|
|
55
|
-
*
|
|
56
|
-
* Rule tag tokens are always placed on the {@link #DEFAULT_CHANNEL}.
|
|
57
|
-
*/
|
|
58
|
-
get channel(): number;
|
|
59
|
-
/**
|
|
60
|
-
* {@inheritDoc}
|
|
61
|
-
*
|
|
62
|
-
* This method returns the rule tag formatted with `<` and `>`
|
|
63
|
-
* delimiters.
|
|
64
|
-
*/
|
|
65
|
-
get text(): string;
|
|
66
|
-
/**
|
|
67
|
-
* {@inheritDoc}
|
|
68
|
-
*
|
|
69
|
-
* Rule tag tokens have types assigned according to the rule bypass
|
|
70
|
-
* transitions created during ATN deserialization.
|
|
71
|
-
*/
|
|
72
|
-
get type(): number;
|
|
73
|
-
/**
|
|
74
|
-
* {@inheritDoc}
|
|
75
|
-
*
|
|
76
|
-
* The implementation for {@link RuleTagToken} always returns 0.
|
|
77
|
-
*/
|
|
78
|
-
get line(): number;
|
|
79
|
-
/**
|
|
80
|
-
* {@inheritDoc}
|
|
81
|
-
*
|
|
82
|
-
* The implementation for {@link RuleTagToken} always returns -1.
|
|
83
|
-
*/
|
|
84
|
-
get charPositionInLine(): number;
|
|
85
|
-
/**
|
|
86
|
-
* {@inheritDoc}
|
|
87
|
-
*
|
|
88
|
-
* The implementation for {@link RuleTagToken} always returns -1.
|
|
89
|
-
*/
|
|
90
|
-
get tokenIndex(): number;
|
|
91
|
-
/**
|
|
92
|
-
* {@inheritDoc}
|
|
93
|
-
*
|
|
94
|
-
* The implementation for {@link RuleTagToken} always returns -1.
|
|
95
|
-
*/
|
|
96
|
-
get startIndex(): number;
|
|
97
|
-
/**
|
|
98
|
-
* {@inheritDoc}
|
|
99
|
-
*
|
|
100
|
-
* The implementation for {@link RuleTagToken} always returns -1.
|
|
101
|
-
*/
|
|
102
|
-
get stopIndex(): number;
|
|
103
|
-
/**
|
|
104
|
-
* {@inheritDoc}
|
|
105
|
-
*
|
|
106
|
-
* The implementation for {@link RuleTagToken} always returns `undefined`.
|
|
107
|
-
*/
|
|
108
|
-
get tokenSource(): TokenSource | undefined;
|
|
109
|
-
/**
|
|
110
|
-
* {@inheritDoc}
|
|
111
|
-
*
|
|
112
|
-
* The implementation for {@link RuleTagToken} always returns `undefined`.
|
|
113
|
-
*/
|
|
114
|
-
get inputStream(): CharStream | undefined;
|
|
115
|
-
/**
|
|
116
|
-
* {@inheritDoc}
|
|
117
|
-
*
|
|
118
|
-
* The implementation for {@link RuleTagToken} returns a string of the form
|
|
119
|
-
* `ruleName:bypassTokenType`.
|
|
120
|
-
*/
|
|
121
|
-
toString(): string;
|
|
122
|
-
}
|