openpinescript 0.1.1__py3-none-any.whl
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.
- openpinescript/__init__.py +129 -0
- openpinescript/__main__.py +5 -0
- openpinescript/_cli.py +24 -0
- openpinescript/_engine/LICENSE +674 -0
- openpinescript/_engine/VERSION +1 -0
- openpinescript/_engine/dist/cli.mjs +108691 -0
- openpinescript/_engine/node_modules/antlr4ng/LICENSE.txt +29 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATN.cjs +3159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATN.js +3159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATN.mjs +3139 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfig.cjs +911 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfig.js +911 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfig.mjs +891 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfigSet.cjs +3781 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfigSet.js +3781 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfigSet.mjs +3761 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializationOptions.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializationOptions.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializationOptions.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializer.cjs +4300 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializer.js +4300 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializer.mjs +4280 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSerializer.cjs +4798 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSerializer.js +4798 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSerializer.mjs +4778 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSimulator.cjs +982 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSimulator.js +982 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSimulator.mjs +962 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNState.cjs +85 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNState.js +85 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNState.mjs +67 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AbstractPredicateTransition.cjs +78 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AbstractPredicateTransition.js +78 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AbstractPredicateTransition.mjs +58 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ActionTransition.cjs +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ActionTransition.js +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ActionTransition.mjs +76 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AmbiguityInfo.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AmbiguityInfo.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AmbiguityInfo.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ArrayPredictionContext.cjs +243 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ArrayPredictionContext.js +243 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ArrayPredictionContext.mjs +223 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AtomTransition.cjs +904 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AtomTransition.js +904 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/AtomTransition.mjs +884 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicBlockStartState.cjs +112 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicBlockStartState.js +112 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicBlockStartState.mjs +92 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicState.cjs +95 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicState.js +95 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicState.mjs +75 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockEndState.cjs +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockEndState.js +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockEndState.mjs +76 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockStartState.cjs +104 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockStartState.js +104 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockStartState.mjs +84 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/CodePointTransitions.cjs +947 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/CodePointTransitions.js +947 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/CodePointTransitions.mjs +927 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ContextSensitivityInfo.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ContextSensitivityInfo.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ContextSensitivityInfo.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionEventInfo.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionEventInfo.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionEventInfo.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionInfo.cjs +206 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionInfo.js +206 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionInfo.mjs +188 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionState.cjs +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionState.js +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionState.mjs +76 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/EmptyPredictionContext.cjs +237 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/EmptyPredictionContext.js +237 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/EmptyPredictionContext.mjs +217 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/EpsilonTransition.cjs +103 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/EpsilonTransition.js +103 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/EpsilonTransition.mjs +83 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LL1Analyzer.cjs +3159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LL1Analyzer.js +3159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LL1Analyzer.mjs +3139 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNConfig.cjs +961 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNConfig.js +961 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNConfig.mjs +941 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNSimulator.cjs +5604 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNSimulator.js +5604 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNSimulator.mjs +5584 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerAction.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerAction.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerAction.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionExecutor.cjs +305 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionExecutor.js +305 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionExecutor.mjs +285 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionType.cjs +42 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionType.js +42 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionType.mjs +22 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerChannelAction.cjs +163 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerChannelAction.js +163 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerChannelAction.mjs +143 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerCustomAction.cjs +169 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerCustomAction.js +169 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerCustomAction.mjs +149 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerIndexedCustomAction.cjs +142 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerIndexedCustomAction.js +142 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerIndexedCustomAction.mjs +122 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerModeAction.cjs +163 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerModeAction.js +163 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerModeAction.mjs +143 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerMoreAction.cjs +73 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerMoreAction.js +73 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerMoreAction.mjs +53 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPopModeAction.cjs +73 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPopModeAction.js +73 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPopModeAction.mjs +53 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPushModeAction.cjs +163 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPushModeAction.js +163 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPushModeAction.mjs +143 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerSkipAction.cjs +71 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerSkipAction.js +71 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerSkipAction.mjs +51 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerTypeAction.cjs +159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerTypeAction.js +159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerTypeAction.mjs +139 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LookaheadEventInfo.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LookaheadEventInfo.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LookaheadEventInfo.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LoopEndState.cjs +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LoopEndState.js +96 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/LoopEndState.mjs +76 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/NotSetTransition.cjs +921 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/NotSetTransition.js +921 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/NotSetTransition.mjs +901 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/OrderedATNConfigSet.cjs +3824 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/OrderedATNConfigSet.js +3824 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/OrderedATNConfigSet.mjs +3804 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParseInfo.cjs +156 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParseInfo.js +156 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParseInfo.mjs +138 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParserATNSimulator.cjs +6082 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParserATNSimulator.js +6082 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParserATNSimulator.mjs +6062 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusBlockStartState.cjs +113 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusBlockStartState.js +113 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusBlockStartState.mjs +93 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusLoopbackState.cjs +104 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusLoopbackState.js +104 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusLoopbackState.mjs +84 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PrecedencePredicateTransition.cjs +887 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PrecedencePredicateTransition.js +887 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PrecedencePredicateTransition.mjs +867 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateEvalInfo.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateEvalInfo.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateEvalInfo.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateTransition.cjs +892 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateTransition.js +892 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateTransition.mjs +872 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContext.cjs +153 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContext.js +153 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContext.mjs +133 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextCache.cjs +715 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextCache.js +715 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextCache.mjs +695 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextUtils.cjs +3604 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextUtils.js +3604 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextUtils.mjs +3584 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionMode.cjs +4284 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionMode.js +4284 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionMode.mjs +4264 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ProfilingATNSimulator.cjs +6467 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ProfilingATNSimulator.js +6467 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/ProfilingATNSimulator.mjs +6447 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RangeTransition.cjs +905 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RangeTransition.js +905 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RangeTransition.mjs +885 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStartState.cjs +97 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStartState.js +97 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStartState.mjs +77 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStopState.cjs +95 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStopState.js +95 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStopState.mjs +75 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleTransition.cjs +93 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleTransition.js +93 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleTransition.mjs +73 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SemanticContext.cjs +807 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SemanticContext.js +807 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SemanticContext.mjs +787 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SetTransition.cjs +905 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SetTransition.js +905 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SetTransition.mjs +885 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SingletonPredictionContext.cjs +207 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SingletonPredictionContext.js +207 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/SingletonPredictionContext.mjs +187 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarBlockStartState.cjs +112 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarBlockStartState.js +112 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarBlockStartState.mjs +92 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopEntryState.cjs +117 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopEntryState.js +117 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopEntryState.mjs +97 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopbackState.cjs +95 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopbackState.js +95 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopbackState.mjs +75 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/TokensStartState.cjs +104 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/TokensStartState.js +104 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/TokensStartState.mjs +84 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/Transition.cjs +66 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/Transition.js +66 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/Transition.mjs +48 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/WildcardTransition.cjs +84 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/WildcardTransition.js +84 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/WildcardTransition.mjs +64 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/helpers.cjs +246 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/helpers.js +246 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/helpers.mjs +226 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/index.cjs +9485 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/index.js +9485 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/atn/index.mjs +9465 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFA.cjs +559 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFA.js +559 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFA.mjs +539 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFASerializer.cjs +76 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFASerializer.js +76 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFASerializer.mjs +58 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAState.cjs +136 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAState.js +136 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAState.mjs +116 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAStateEqualityComparator.cjs +150 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAStateEqualityComparator.js +150 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAStateEqualityComparator.mjs +130 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/LexerDFASerializer.cjs +237 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/LexerDFASerializer.js +237 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/LexerDFASerializer.mjs +217 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/PredPrediction.cjs +31 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/PredPrediction.js +31 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/PredPrediction.mjs +13 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/index.cjs +571 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/index.js +571 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/dfa/index.mjs +551 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/index.cjs +17501 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/index.mjs +17481 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/BitSet.cjs +208 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/BitSet.js +208 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/BitSet.mjs +190 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/DefaultEqualityComparator.cjs +68 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/DefaultEqualityComparator.js +68 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/DefaultEqualityComparator.mjs +48 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/EqualityComparator.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/EqualityComparator.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/EqualityComparator.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashMap.cjs +545 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashMap.js +545 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashMap.mjs +525 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashSet.cjs +438 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashSet.js +438 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashSet.mjs +418 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/InterpreterDataReader.cjs +4420 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/InterpreterDataReader.js +4420 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/InterpreterDataReader.mjs +4400 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/Interval.cjs +133 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/Interval.js +133 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/Interval.mjs +115 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/IntervalSet.cjs +834 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/IntervalSet.js +834 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/IntervalSet.mjs +814 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/MapKeyEqualityOperator.cjs +40 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/MapKeyEqualityOperator.js +40 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/MapKeyEqualityOperator.mjs +22 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/MultiMap.cjs +55 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/MultiMap.js +55 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/MultiMap.mjs +37 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/ObjectEqualityComparator.cjs +43 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/ObjectEqualityComparator.js +43 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/ObjectEqualityComparator.mjs +25 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashMap.cjs +610 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashMap.js +610 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashMap.mjs +590 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashSet.cjs +470 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashSet.js +470 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashSet.mjs +450 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/ParseCancellationException.cjs +34 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/ParseCancellationException.js +34 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/ParseCancellationException.mjs +16 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/index.cjs +4643 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/index.js +4643 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/misc/index.mjs +4623 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/AbstractParseTreeVisitor.cjs +63 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/AbstractParseTreeVisitor.js +63 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/AbstractParseTreeVisitor.mjs +45 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ErrorNode.cjs +211 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ErrorNode.js +211 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ErrorNode.mjs +191 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTree.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTree.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTree.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeListener.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeListener.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeListener.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeVisitor.cjs +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeVisitor.js +17 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeVisitor.mjs +0 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeWalker.cjs +267 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeWalker.js +267 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeWalker.mjs +247 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/TerminalNode.cjs +201 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/TerminalNode.js +201 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/TerminalNode.mjs +181 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/Trees.cjs +3159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/Trees.js +3159 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/Trees.mjs +3139 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/index.cjs +16018 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/index.js +16018 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/tree/index.mjs +15998 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/DoubleDict.cjs +568 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/DoubleDict.js +568 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/DoubleDict.mjs +548 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/MurmurHash.cjs +98 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/MurmurHash.js +98 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/MurmurHash.mjs +80 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/helpers.cjs +78 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/helpers.js +78 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/helpers.mjs +60 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/index.cjs +625 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/index.js +625 -0
- openpinescript/_engine/node_modules/antlr4ng/dist/utils/index.mjs +605 -0
- openpinescript/_engine/node_modules/antlr4ng/package.json +72 -0
- openpinescript/_engine/package.json +94 -0
- openpinescript/_runtime.py +29 -0
- openpinescript-0.1.1.dist-info/METADATA +140 -0
- openpinescript-0.1.1.dist-info/RECORD +332 -0
- openpinescript-0.1.1.dist-info/WHEEL +4 -0
- openpinescript-0.1.1.dist-info/entry_points.txt +2 -0
- openpinescript-0.1.1.dist-info/licenses/LICENSE +674 -0
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/misc/OrderedHashSet.ts
|
|
21
|
+
var OrderedHashSet_exports = {};
|
|
22
|
+
__export(OrderedHashSet_exports, {
|
|
23
|
+
OrderedHashSet: () => OrderedHashSet
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(OrderedHashSet_exports);
|
|
26
|
+
|
|
27
|
+
// src/utils/MurmurHash.ts
|
|
28
|
+
var c1 = 3432918353;
|
|
29
|
+
var c2 = 461845907;
|
|
30
|
+
var r1 = 15;
|
|
31
|
+
var r2 = 13;
|
|
32
|
+
var m = 5;
|
|
33
|
+
var n = 3864292196;
|
|
34
|
+
var MurmurHash = class _MurmurHash {
|
|
35
|
+
static {
|
|
36
|
+
__name(this, "MurmurHash");
|
|
37
|
+
}
|
|
38
|
+
static defaultSeed = 701;
|
|
39
|
+
constructor() {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Initialize the hash using the specified {@code seed}.
|
|
43
|
+
*
|
|
44
|
+
* @param seed the seed
|
|
45
|
+
*
|
|
46
|
+
* @returns the intermediate hash value
|
|
47
|
+
*/
|
|
48
|
+
static initialize(seed = _MurmurHash.defaultSeed) {
|
|
49
|
+
return seed;
|
|
50
|
+
}
|
|
51
|
+
static updateFromComparable(hash, value) {
|
|
52
|
+
return this.update(hash, value?.hashCode() ?? 0);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Update the intermediate hash value for the next input {@code value}.
|
|
56
|
+
*
|
|
57
|
+
* @param hash The intermediate hash value.
|
|
58
|
+
* @param value the value to add to the current hash.
|
|
59
|
+
*
|
|
60
|
+
* @returns the updated intermediate hash value
|
|
61
|
+
*/
|
|
62
|
+
static update(hash, value) {
|
|
63
|
+
value = Math.imul(value, c1);
|
|
64
|
+
value = value << r1 | value >>> 32 - r1;
|
|
65
|
+
value = Math.imul(value, c2);
|
|
66
|
+
hash = hash ^ value;
|
|
67
|
+
hash = hash << r2 | hash >>> 32 - r2;
|
|
68
|
+
hash = Math.imul(hash, m) + n;
|
|
69
|
+
return hash;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Apply the final computation steps to the intermediate value {@code hash}
|
|
73
|
+
* to form the final result of the MurmurHash 3 hash function.
|
|
74
|
+
*
|
|
75
|
+
* @param hash The intermediate hash value.
|
|
76
|
+
* @param entryCount The number of values added to the hash.
|
|
77
|
+
*
|
|
78
|
+
* @returns the final hash result
|
|
79
|
+
*/
|
|
80
|
+
static finish(hash, entryCount) {
|
|
81
|
+
hash ^= entryCount * 4;
|
|
82
|
+
hash ^= hash >>> 16;
|
|
83
|
+
hash = Math.imul(hash, 2246822507);
|
|
84
|
+
hash ^= hash >>> 13;
|
|
85
|
+
hash = Math.imul(hash, 3266489909);
|
|
86
|
+
hash ^= hash >>> 16;
|
|
87
|
+
return hash;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* An all-in-one convenience method to compute a hash for a single value.
|
|
91
|
+
*
|
|
92
|
+
* @param value The value to hash.
|
|
93
|
+
* @param seed The seed for the hash value.
|
|
94
|
+
*
|
|
95
|
+
* @returns The computed hash.
|
|
96
|
+
*/
|
|
97
|
+
static hashCode(value, seed) {
|
|
98
|
+
return _MurmurHash.finish(_MurmurHash.update(seed ?? _MurmurHash.defaultSeed, value), 1);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// src/misc/ObjectEqualityComparator.ts
|
|
103
|
+
var ObjectEqualityComparator = class _ObjectEqualityComparator {
|
|
104
|
+
static {
|
|
105
|
+
__name(this, "ObjectEqualityComparator");
|
|
106
|
+
}
|
|
107
|
+
static instance = new _ObjectEqualityComparator();
|
|
108
|
+
hashCode(obj) {
|
|
109
|
+
if (obj == null) {
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
return obj.hashCode();
|
|
113
|
+
}
|
|
114
|
+
equals(a, b) {
|
|
115
|
+
if (a == null) {
|
|
116
|
+
return b == null;
|
|
117
|
+
}
|
|
118
|
+
return a.equals(b);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// src/misc/DefaultEqualityComparator.ts
|
|
123
|
+
var DefaultEqualityComparator = class _DefaultEqualityComparator {
|
|
124
|
+
static {
|
|
125
|
+
__name(this, "DefaultEqualityComparator");
|
|
126
|
+
}
|
|
127
|
+
static instance = new _DefaultEqualityComparator();
|
|
128
|
+
hashCode(obj) {
|
|
129
|
+
if (obj == null) {
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
return ObjectEqualityComparator.instance.hashCode(obj);
|
|
133
|
+
}
|
|
134
|
+
equals(a, b) {
|
|
135
|
+
if (a == null) {
|
|
136
|
+
return b == null;
|
|
137
|
+
}
|
|
138
|
+
if (typeof a === "string" || typeof a === "number") {
|
|
139
|
+
return a === b;
|
|
140
|
+
}
|
|
141
|
+
return ObjectEqualityComparator.instance.equals(a, b);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// src/misc/HashSet.ts
|
|
146
|
+
var HashSet = class _HashSet {
|
|
147
|
+
static {
|
|
148
|
+
__name(this, "HashSet");
|
|
149
|
+
}
|
|
150
|
+
static defaultLoadFactor = 0.75;
|
|
151
|
+
static initialCapacity = 16;
|
|
152
|
+
// must be power of 2
|
|
153
|
+
comparator;
|
|
154
|
+
buckets;
|
|
155
|
+
threshold;
|
|
156
|
+
/** How many elements in set */
|
|
157
|
+
itemCount = 0;
|
|
158
|
+
constructor(comparatorOrSet, initialCapacity = _HashSet.initialCapacity) {
|
|
159
|
+
if (comparatorOrSet instanceof _HashSet) {
|
|
160
|
+
this.comparator = comparatorOrSet.comparator;
|
|
161
|
+
this.buckets = comparatorOrSet.buckets.slice(0);
|
|
162
|
+
for (let i = 0; i < this.buckets.length; i++) {
|
|
163
|
+
const bucket = this.buckets[i];
|
|
164
|
+
if (bucket) {
|
|
165
|
+
this.buckets[i] = bucket.slice(0);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
this.itemCount = comparatorOrSet.itemCount;
|
|
169
|
+
this.threshold = comparatorOrSet.threshold;
|
|
170
|
+
} else {
|
|
171
|
+
this.comparator = comparatorOrSet ?? DefaultEqualityComparator.instance;
|
|
172
|
+
this.buckets = this.createBuckets(initialCapacity);
|
|
173
|
+
this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Add `o` to set if not there; return existing value if already
|
|
178
|
+
* there. This method performs the same operation as {@link #add} aside from
|
|
179
|
+
* the return value.
|
|
180
|
+
*
|
|
181
|
+
* @param o the object to add to the set.
|
|
182
|
+
*
|
|
183
|
+
* @returns An existing element that equals to `o` if already in set, otherwise `o`.
|
|
184
|
+
*/
|
|
185
|
+
getOrAdd(o) {
|
|
186
|
+
if (this.itemCount > this.threshold) {
|
|
187
|
+
this.expand();
|
|
188
|
+
}
|
|
189
|
+
const b = this.getBucket(o);
|
|
190
|
+
let bucket = this.buckets[b];
|
|
191
|
+
if (!bucket) {
|
|
192
|
+
bucket = [o];
|
|
193
|
+
this.buckets[b] = bucket;
|
|
194
|
+
++this.itemCount;
|
|
195
|
+
return o;
|
|
196
|
+
}
|
|
197
|
+
for (const existing of bucket) {
|
|
198
|
+
if (this.comparator.equals(existing, o)) {
|
|
199
|
+
return existing;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
bucket.push(o);
|
|
203
|
+
++this.itemCount;
|
|
204
|
+
return o;
|
|
205
|
+
}
|
|
206
|
+
get(o) {
|
|
207
|
+
if (o == null) {
|
|
208
|
+
return o;
|
|
209
|
+
}
|
|
210
|
+
const b = this.getBucket(o);
|
|
211
|
+
const bucket = this.buckets[b];
|
|
212
|
+
if (!bucket) {
|
|
213
|
+
return void 0;
|
|
214
|
+
}
|
|
215
|
+
for (const e of bucket) {
|
|
216
|
+
if (this.comparator.equals(e, o)) {
|
|
217
|
+
return e;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return void 0;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Removes the specified element from this set if it is present.
|
|
224
|
+
*
|
|
225
|
+
* @param o object to be removed from this set, if present.
|
|
226
|
+
*
|
|
227
|
+
* @returns `true` if the set contained the specified element.
|
|
228
|
+
*/
|
|
229
|
+
remove(o) {
|
|
230
|
+
if (o == null) {
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
const b = this.getBucket(o);
|
|
234
|
+
const bucket = this.buckets[b];
|
|
235
|
+
if (!bucket) {
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
for (let i = 0; i < bucket.length; i++) {
|
|
239
|
+
const existing = bucket[i];
|
|
240
|
+
if (this.comparator.equals(existing, o)) {
|
|
241
|
+
bucket.splice(i, 1);
|
|
242
|
+
--this.itemCount;
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
hashCode() {
|
|
249
|
+
let hash = MurmurHash.initialize();
|
|
250
|
+
for (const bucket of this.buckets) {
|
|
251
|
+
if (bucket == null) {
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
for (const o of bucket) {
|
|
255
|
+
if (o == null) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
hash = MurmurHash.update(hash, this.comparator.hashCode(o));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
hash = MurmurHash.finish(hash, this.size);
|
|
262
|
+
return hash;
|
|
263
|
+
}
|
|
264
|
+
equals(o) {
|
|
265
|
+
if (o === this) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
if (!(o instanceof _HashSet)) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
if (o.size !== this.size) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
return this.containsAll(o);
|
|
275
|
+
}
|
|
276
|
+
add(t) {
|
|
277
|
+
const existing = this.getOrAdd(t);
|
|
278
|
+
return existing === t;
|
|
279
|
+
}
|
|
280
|
+
contains(o) {
|
|
281
|
+
return this.containsFast(o);
|
|
282
|
+
}
|
|
283
|
+
containsFast(obj) {
|
|
284
|
+
if (obj == null) {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
return this.get(obj) !== void 0;
|
|
288
|
+
}
|
|
289
|
+
*[Symbol.iterator]() {
|
|
290
|
+
yield* this.toArray();
|
|
291
|
+
}
|
|
292
|
+
toArray() {
|
|
293
|
+
const a = new Array(this.size);
|
|
294
|
+
let i = 0;
|
|
295
|
+
for (const bucket of this.buckets) {
|
|
296
|
+
if (bucket == null) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
for (const o of bucket) {
|
|
300
|
+
if (o == null) {
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
a[i++] = o;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return a;
|
|
307
|
+
}
|
|
308
|
+
containsAll(collection) {
|
|
309
|
+
if (collection instanceof _HashSet) {
|
|
310
|
+
for (const bucket of collection.buckets) {
|
|
311
|
+
if (bucket == null) {
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
for (const o of bucket) {
|
|
315
|
+
if (o == null) {
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
if (!this.containsFast(o)) {
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
} else {
|
|
324
|
+
for (const o of collection) {
|
|
325
|
+
if (!this.containsFast(o)) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
332
|
+
addAll(c) {
|
|
333
|
+
let changed = false;
|
|
334
|
+
for (const o of c) {
|
|
335
|
+
const existing = this.getOrAdd(o);
|
|
336
|
+
if (existing !== o) {
|
|
337
|
+
changed = true;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return changed;
|
|
341
|
+
}
|
|
342
|
+
clear() {
|
|
343
|
+
this.buckets = this.createBuckets(_HashSet.initialCapacity);
|
|
344
|
+
this.itemCount = 0;
|
|
345
|
+
this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
|
|
346
|
+
}
|
|
347
|
+
toString() {
|
|
348
|
+
if (this.size === 0) {
|
|
349
|
+
return "{}";
|
|
350
|
+
}
|
|
351
|
+
let buf = "{";
|
|
352
|
+
let first = true;
|
|
353
|
+
for (const bucket of this.buckets) {
|
|
354
|
+
if (bucket == null) {
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
for (const o of bucket) {
|
|
358
|
+
if (o == null) {
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
if (first) {
|
|
362
|
+
first = false;
|
|
363
|
+
} else {
|
|
364
|
+
buf += ", ";
|
|
365
|
+
}
|
|
366
|
+
buf += o.toString();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
buf += "}";
|
|
370
|
+
return buf;
|
|
371
|
+
}
|
|
372
|
+
toTableString() {
|
|
373
|
+
let buf = "";
|
|
374
|
+
for (const bucket of this.buckets) {
|
|
375
|
+
if (bucket == null) {
|
|
376
|
+
buf += "null\n";
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
buf += "[";
|
|
380
|
+
let first = true;
|
|
381
|
+
for (const o of bucket) {
|
|
382
|
+
if (first) {
|
|
383
|
+
first = false;
|
|
384
|
+
} else {
|
|
385
|
+
buf += " ";
|
|
386
|
+
}
|
|
387
|
+
if (o == null) {
|
|
388
|
+
buf += "_";
|
|
389
|
+
} else {
|
|
390
|
+
buf += o.toString();
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
buf += "]\n";
|
|
394
|
+
}
|
|
395
|
+
return buf;
|
|
396
|
+
}
|
|
397
|
+
getBucket(o) {
|
|
398
|
+
const hash = this.comparator.hashCode(o);
|
|
399
|
+
const b = hash & this.buckets.length - 1;
|
|
400
|
+
return b;
|
|
401
|
+
}
|
|
402
|
+
expand() {
|
|
403
|
+
const old = this.buckets;
|
|
404
|
+
const newCapacity = this.buckets.length * 2;
|
|
405
|
+
const newTable = this.createBuckets(newCapacity);
|
|
406
|
+
this.buckets = newTable;
|
|
407
|
+
this.threshold = Math.floor(newCapacity * _HashSet.defaultLoadFactor);
|
|
408
|
+
for (const bucket of old) {
|
|
409
|
+
if (!bucket) {
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
for (const o of bucket) {
|
|
413
|
+
const b = this.getBucket(o);
|
|
414
|
+
let newBucket = this.buckets[b];
|
|
415
|
+
if (!newBucket) {
|
|
416
|
+
newBucket = [];
|
|
417
|
+
this.buckets[b] = newBucket;
|
|
418
|
+
}
|
|
419
|
+
newBucket.push(o);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
get size() {
|
|
424
|
+
return this.itemCount;
|
|
425
|
+
}
|
|
426
|
+
get isEmpty() {
|
|
427
|
+
return this.itemCount === 0;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Return an array of `T[]` with length `capacity`.
|
|
431
|
+
*
|
|
432
|
+
* @param capacity the length of the array to return
|
|
433
|
+
* @returns the newly constructed array
|
|
434
|
+
*/
|
|
435
|
+
createBuckets(capacity) {
|
|
436
|
+
return new Array(capacity);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
// src/misc/OrderedHashSet.ts
|
|
441
|
+
var OrderedHashSet = class _OrderedHashSet extends HashSet {
|
|
442
|
+
static {
|
|
443
|
+
__name(this, "OrderedHashSet");
|
|
444
|
+
}
|
|
445
|
+
elements = [];
|
|
446
|
+
getOrAdd(o) {
|
|
447
|
+
const oldSize = this.size;
|
|
448
|
+
const result = super.getOrAdd(o);
|
|
449
|
+
if (this.size > oldSize) {
|
|
450
|
+
this.elements.push(o);
|
|
451
|
+
}
|
|
452
|
+
return result;
|
|
453
|
+
}
|
|
454
|
+
equals(o) {
|
|
455
|
+
if (!(o instanceof _OrderedHashSet)) {
|
|
456
|
+
return false;
|
|
457
|
+
}
|
|
458
|
+
return super.equals(o);
|
|
459
|
+
}
|
|
460
|
+
clear() {
|
|
461
|
+
super.clear();
|
|
462
|
+
this.elements = [];
|
|
463
|
+
}
|
|
464
|
+
*[Symbol.iterator]() {
|
|
465
|
+
yield* this.elements;
|
|
466
|
+
}
|
|
467
|
+
toArray() {
|
|
468
|
+
return this.elements.slice(0);
|
|
469
|
+
}
|
|
470
|
+
};
|