suggestionKind.ts 715 B

123456789101112131415161718
  1. import { StatementPosition, SuggestionKind } from '../../monarch/types';
  2. export function getSuggestionKinds(statementPosition: StatementPosition): SuggestionKind[] {
  3. switch (statementPosition) {
  4. case StatementPosition.PredefinedFunction:
  5. return [SuggestionKind.FunctionsWithArguments];
  6. case StatementPosition.PredefinedFuncSecondArg:
  7. return [SuggestionKind.FunctionsWithArguments, SuggestionKind.KeywordArguments];
  8. case StatementPosition.AfterFunction:
  9. return [SuggestionKind.Operators];
  10. case StatementPosition.SearchFuncSecondArg:
  11. return [SuggestionKind.Statistic];
  12. case StatementPosition.SearchFuncThirdArg:
  13. return [SuggestionKind.Period];
  14. }
  15. return [];
  16. }