symbols.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
  6. *
  7. * Adapted from MolQL project
  8. */
  9. import { properties } from './properties';
  10. import { operators } from './operators';
  11. import { keywords } from './keywords';
  12. export const Properties: string[] = [];
  13. for (const name in properties) {
  14. if (properties[name].isUnsupported) continue;
  15. Properties.push(name);
  16. if (properties[name].abbr) Properties.push(...properties[name].abbr!);
  17. }
  18. export const Operators: string[] = [];
  19. operators.forEach(o => {
  20. if (o.isUnsupported) return;
  21. Operators.push(o.name);
  22. if (o.abbr) Operators.push(...o.abbr);
  23. });
  24. export const Keywords: string[] = [];
  25. for (const name in keywords) {
  26. if (!keywords[name].map) continue;
  27. Keywords.push(name);
  28. if (keywords[name].abbr) Keywords.push(...keywords[name].abbr!);
  29. }
  30. export const all = { Properties, Operators: [...Operators, 'of'], Keywords };