javascript.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. import { conf as tsConf, language as tsLanguage } from '../typescript/typescript';
  6. import type { languages } from '../../fillers/monaco-editor-core';
  7. export const conf: languages.LanguageConfiguration = tsConf;
  8. export const language = <languages.IMonarchLanguage>{
  9. // Set defaultToken to invalid to see what you do not tokenize yet
  10. defaultToken: 'invalid',
  11. tokenPostfix: '.js',
  12. keywords: [
  13. 'break',
  14. 'case',
  15. 'catch',
  16. 'class',
  17. 'continue',
  18. 'const',
  19. 'constructor',
  20. 'debugger',
  21. 'default',
  22. 'delete',
  23. 'do',
  24. 'else',
  25. 'export',
  26. 'extends',
  27. 'false',
  28. 'finally',
  29. 'for',
  30. 'from',
  31. 'function',
  32. 'get',
  33. 'if',
  34. 'import',
  35. 'in',
  36. 'instanceof',
  37. 'let',
  38. 'new',
  39. 'null',
  40. 'return',
  41. 'set',
  42. 'static',
  43. 'super',
  44. 'switch',
  45. 'symbol',
  46. 'this',
  47. 'throw',
  48. 'true',
  49. 'try',
  50. 'typeof',
  51. 'undefined',
  52. 'var',
  53. 'void',
  54. 'while',
  55. 'with',
  56. 'yield',
  57. 'async',
  58. 'await',
  59. 'of'
  60. ],
  61. typeKeywords: [],
  62. operators: tsLanguage.operators,
  63. symbols: tsLanguage.symbols,
  64. escapes: tsLanguage.escapes,
  65. digits: tsLanguage.digits,
  66. octaldigits: tsLanguage.octaldigits,
  67. binarydigits: tsLanguage.binarydigits,
  68. hexdigits: tsLanguage.hexdigits,
  69. regexpctl: tsLanguage.regexpctl,
  70. regexpesc: tsLanguage.regexpesc,
  71. tokenizer: tsLanguage.tokenizer
  72. };