quickjs-atom.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*
  2. * QuickJS atom definitions
  3. *
  4. * Copyright (c) 2017-2018 Fabrice Bellard
  5. * Copyright (c) 2017-2018 Charlie Gordon
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a copy
  8. * of this software and associated documentation files (the "Software"), to deal
  9. * in the Software without restriction, including without limitation the rights
  10. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. * copies of the Software, and to permit persons to whom the Software is
  12. * furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included in
  15. * all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  20. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  23. * THE SOFTWARE.
  24. */
  25. #ifdef DEF
  26. /* Note: first atoms are considered as keywords in the parser */
  27. DEF(null, "null") /* must be first */
  28. DEF(false, "false")
  29. DEF(true, "true")
  30. DEF(if, "if")
  31. DEF(else, "else")
  32. DEF(return, "return")
  33. DEF(var, "var")
  34. DEF(this, "this")
  35. DEF(delete, "delete")
  36. DEF(void, "void")
  37. DEF(typeof, "typeof")
  38. DEF(new, "new")
  39. DEF(in, "in")
  40. DEF(instanceof, "instanceof")
  41. DEF(do, "do")
  42. DEF(while, "while")
  43. DEF(for, "for")
  44. DEF(break, "break")
  45. DEF(continue, "continue")
  46. DEF(switch, "switch")
  47. DEF(case, "case")
  48. DEF(default, "default")
  49. DEF(throw, "throw")
  50. DEF(try, "try")
  51. DEF(catch, "catch")
  52. DEF(finally, "finally")
  53. DEF(function, "function")
  54. DEF(debugger, "debugger")
  55. DEF(with, "with")
  56. /* FutureReservedWord */
  57. DEF(class, "class")
  58. DEF(const, "const")
  59. DEF(enum, "enum")
  60. DEF(export, "export")
  61. DEF(extends, "extends")
  62. DEF(import, "import")
  63. DEF(super, "super")
  64. /* FutureReservedWords when parsing strict mode code */
  65. DEF(implements, "implements")
  66. DEF(interface, "interface")
  67. DEF(let, "let")
  68. DEF(package, "package")
  69. DEF(private, "private")
  70. DEF(protected, "protected")
  71. DEF(public, "public")
  72. DEF(static, "static")
  73. DEF(yield, "yield")
  74. DEF(await, "await")
  75. /* empty string */
  76. DEF(empty_string, "")
  77. /* identifiers */
  78. DEF(keys, "keys")
  79. DEF(size, "size")
  80. DEF(length, "length")
  81. DEF(fileName, "fileName")
  82. DEF(lineNumber, "lineNumber")
  83. DEF(columnNumber, "columnNumber")
  84. DEF(message, "message")
  85. DEF(cause, "cause")
  86. DEF(errors, "errors")
  87. DEF(stack, "stack")
  88. DEF(name, "name")
  89. DEF(toString, "toString")
  90. DEF(toLocaleString, "toLocaleString")
  91. DEF(valueOf, "valueOf")
  92. DEF(eval, "eval")
  93. DEF(prototype, "prototype")
  94. DEF(constructor, "constructor")
  95. DEF(configurable, "configurable")
  96. DEF(writable, "writable")
  97. DEF(enumerable, "enumerable")
  98. DEF(value, "value")
  99. DEF(get, "get")
  100. DEF(set, "set")
  101. DEF(of, "of")
  102. DEF(__proto__, "__proto__")
  103. DEF(undefined, "undefined")
  104. DEF(number, "number")
  105. DEF(boolean, "boolean")
  106. DEF(string, "string")
  107. DEF(object, "object")
  108. DEF(symbol, "symbol")
  109. DEF(integer, "integer")
  110. DEF(unknown, "unknown")
  111. DEF(arguments, "arguments")
  112. DEF(callee, "callee")
  113. DEF(caller, "caller")
  114. DEF(_eval_, "<eval>")
  115. DEF(_ret_, "<ret>")
  116. DEF(_var_, "<var>")
  117. DEF(_arg_var_, "<arg_var>")
  118. DEF(_with_, "<with>")
  119. DEF(lastIndex, "lastIndex")
  120. DEF(target, "target")
  121. DEF(index, "index")
  122. DEF(input, "input")
  123. DEF(defineProperties, "defineProperties")
  124. DEF(apply, "apply")
  125. DEF(join, "join")
  126. DEF(concat, "concat")
  127. DEF(split, "split")
  128. DEF(construct, "construct")
  129. DEF(getPrototypeOf, "getPrototypeOf")
  130. DEF(setPrototypeOf, "setPrototypeOf")
  131. DEF(isExtensible, "isExtensible")
  132. DEF(preventExtensions, "preventExtensions")
  133. DEF(has, "has")
  134. DEF(deleteProperty, "deleteProperty")
  135. DEF(defineProperty, "defineProperty")
  136. DEF(getOwnPropertyDescriptor, "getOwnPropertyDescriptor")
  137. DEF(ownKeys, "ownKeys")
  138. DEF(add, "add")
  139. DEF(done, "done")
  140. DEF(next, "next")
  141. DEF(values, "values")
  142. DEF(source, "source")
  143. DEF(flags, "flags")
  144. DEF(global, "global")
  145. DEF(unicode, "unicode")
  146. DEF(raw, "raw")
  147. DEF(rawJSON, "rawJSON")
  148. DEF(new_target, "new.target")
  149. DEF(this_active_func, "this.active_func")
  150. DEF(home_object, "<home_object>")
  151. DEF(computed_field, "<computed_field>")
  152. DEF(static_computed_field, "<static_computed_field>") /* must come after computed_fields */
  153. DEF(class_fields_init, "<class_fields_init>")
  154. DEF(brand, "<brand>")
  155. DEF(hash_constructor, "#constructor")
  156. DEF(as, "as")
  157. DEF(from, "from")
  158. DEF(meta, "meta")
  159. DEF(_default_, "*default*")
  160. DEF(_star_, "*")
  161. DEF(Module, "Module")
  162. DEF(then, "then")
  163. DEF(resolve, "resolve")
  164. DEF(reject, "reject")
  165. DEF(promise, "promise")
  166. DEF(proxy, "proxy")
  167. DEF(revoke, "revoke")
  168. DEF(async, "async")
  169. DEF(exec, "exec")
  170. DEF(groups, "groups")
  171. DEF(indices, "indices")
  172. DEF(status, "status")
  173. DEF(reason, "reason")
  174. DEF(globalThis, "globalThis")
  175. DEF(bigint, "bigint")
  176. DEF(minus_zero, "-0")
  177. DEF(Infinity, "Infinity")
  178. DEF(minus_Infinity, "-Infinity")
  179. DEF(NaN, "NaN")
  180. DEF(hasIndices, "hasIndices")
  181. DEF(ignoreCase, "ignoreCase")
  182. DEF(multiline, "multiline")
  183. DEF(dotAll, "dotAll")
  184. DEF(sticky, "sticky")
  185. DEF(unicodeSets, "unicodeSets")
  186. /* the following 3 atoms are only used with CONFIG_ATOMICS */
  187. DEF(not_equal, "not-equal")
  188. DEF(timed_out, "timed-out")
  189. DEF(ok, "ok")
  190. DEF(toISOString, "toISOString")
  191. DEF(alphabet, "alphabet")
  192. DEF(lastChunkHandling, "lastChunkHandling")
  193. DEF(omitPadding, "omitPadding")
  194. /* */
  195. DEF(toJSON, "toJSON")
  196. DEF(maxByteLength, "maxByteLength")
  197. /* class names */
  198. DEF(Object, "Object")
  199. DEF(Array, "Array")
  200. DEF(Error, "Error")
  201. DEF(Number, "Number")
  202. DEF(String, "String")
  203. DEF(Boolean, "Boolean")
  204. DEF(Symbol, "Symbol")
  205. DEF(Arguments, "Arguments")
  206. DEF(Math, "Math")
  207. DEF(JSON, "JSON")
  208. DEF(Date, "Date")
  209. DEF(Function, "Function")
  210. DEF(GeneratorFunction, "GeneratorFunction")
  211. DEF(ForInIterator, "ForInIterator")
  212. DEF(RegExp, "RegExp")
  213. DEF(ArrayBuffer, "ArrayBuffer")
  214. DEF(SharedArrayBuffer, "SharedArrayBuffer")
  215. /* must keep same order as class IDs for typed arrays */
  216. DEF(Uint8ClampedArray, "Uint8ClampedArray")
  217. DEF(Int8Array, "Int8Array")
  218. DEF(Uint8Array, "Uint8Array")
  219. DEF(Int16Array, "Int16Array")
  220. DEF(Uint16Array, "Uint16Array")
  221. DEF(Int32Array, "Int32Array")
  222. DEF(Uint32Array, "Uint32Array")
  223. DEF(BigInt64Array, "BigInt64Array")
  224. DEF(BigUint64Array, "BigUint64Array")
  225. DEF(Float16Array, "Float16Array")
  226. DEF(Float32Array, "Float32Array")
  227. DEF(Float64Array, "Float64Array")
  228. DEF(DataView, "DataView")
  229. DEF(BigInt, "BigInt")
  230. DEF(WeakRef, "WeakRef")
  231. DEF(FinalizationRegistry, "FinalizationRegistry")
  232. DEF(Map, "Map")
  233. DEF(Set, "Set") /* Map + 1 */
  234. DEF(WeakMap, "WeakMap") /* Map + 2 */
  235. DEF(WeakSet, "WeakSet") /* Map + 3 */
  236. DEF(Iterator, "Iterator")
  237. DEF(IteratorHelper, "Iterator Helper")
  238. DEF(IteratorConcat, "Iterator Concat")
  239. DEF(IteratorWrap, "Iterator Wrap")
  240. DEF(Map_Iterator, "Map Iterator")
  241. DEF(Set_Iterator, "Set Iterator")
  242. DEF(Array_Iterator, "Array Iterator")
  243. DEF(String_Iterator, "String Iterator")
  244. DEF(RegExp_String_Iterator, "RegExp String Iterator")
  245. DEF(Generator, "Generator")
  246. DEF(Proxy, "Proxy")
  247. DEF(Promise, "Promise")
  248. DEF(PromiseResolveFunction, "PromiseResolveFunction")
  249. DEF(PromiseRejectFunction, "PromiseRejectFunction")
  250. DEF(AsyncFunction, "AsyncFunction")
  251. DEF(AsyncFunctionResolve, "AsyncFunctionResolve")
  252. DEF(AsyncFunctionReject, "AsyncFunctionReject")
  253. DEF(AsyncGeneratorFunction, "AsyncGeneratorFunction")
  254. DEF(AsyncGenerator, "AsyncGenerator")
  255. DEF(EvalError, "EvalError")
  256. DEF(RangeError, "RangeError")
  257. DEF(ReferenceError, "ReferenceError")
  258. DEF(SyntaxError, "SyntaxError")
  259. DEF(TypeError, "TypeError")
  260. DEF(URIError, "URIError")
  261. DEF(InternalError, "InternalError")
  262. DEF(AggregateError, "AggregateError")
  263. /* private symbols */
  264. DEF(Private_brand, "<brand>")
  265. /* symbols */
  266. DEF(Symbol_toPrimitive, "Symbol.toPrimitive")
  267. DEF(Symbol_iterator, "Symbol.iterator")
  268. DEF(Symbol_match, "Symbol.match")
  269. DEF(Symbol_matchAll, "Symbol.matchAll")
  270. DEF(Symbol_replace, "Symbol.replace")
  271. DEF(Symbol_search, "Symbol.search")
  272. DEF(Symbol_split, "Symbol.split")
  273. DEF(Symbol_toStringTag, "Symbol.toStringTag")
  274. DEF(Symbol_isConcatSpreadable, "Symbol.isConcatSpreadable")
  275. DEF(Symbol_hasInstance, "Symbol.hasInstance")
  276. DEF(Symbol_species, "Symbol.species")
  277. DEF(Symbol_unscopables, "Symbol.unscopables")
  278. DEF(Symbol_asyncIterator, "Symbol.asyncIterator")
  279. #endif /* DEF */