0.26.0 • Published 11 months ago

hermes-parser v0.26.0

Weekly downloads
24
License
MIT
Repository
github
Last release
11 months ago

hermes-parser

A JavaScript parser built from the Hermes engine's parser compiled to WebAssembly. Can parse ES6, Flow, and JSX syntax.

API

The Hermes parser exposes a single parse(code, [options]) function, where code is the source code to parse as a string, and options is an optional object that may contain the following properties:

  • babel: boolean, defaults to false. If true, output an AST conforming to Babel's AST format. If false, output an AST conforming to the ESTree AST format.
  • allowReturnOutsideFunction: boolean, defaults to false. If true, do not error on return statements found outside functions.
  • flow: "all" or "detect", defaults to "detect". If "detect", only parse syntax as Flow syntax where it is ambiguous whether it is a Flow feature or regular JavaScript when the @flow pragma is present in the file. Otherwise if "all", always parse ambiguous syntax as Flow syntax regardless of the presence of an @flow pragma. For example foo<T>(x) in a file without an @flow pragma will be parsed as two comparisons if set to "detect", otherwise if set to "all" or the @flow pragma is included it will be parsed as a call expression with a type argument.
  • sourceFilename: string, defaults to null. The filename corresponding to the code that is to be parsed. If non-null, the filename will be added to all source locations in the output AST.
  • sourceType: "module", "script", or "unambiguous" (default). If "unambiguous", source type will be automatically detected and set to "module" if any ES6 imports or exports are present in the code, otherwise source type will be set to "script".
  • tokens: boolean, defaults to false. If true, add all tokens to a tokens property on the root node.
eslint-plugin-react-hooks@react-native/babel-transformereasy-select-rnreact-native-shekhar-bridge-testwilscanner@oiti/documentoscopy-react-nativequoc-testreact-native-slider-kf@infinitebrahmanuniverse/nolb-herluminos-ui-core@everything-registry/sub-chunk-1840jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_samplegriffin-ui-librarytest-library-123test-haptik-libtest-npm-jjmessiwifi_configuration_packagetest-zeo-collectvision-camera-plugin-face-detectorvision-camera-base64-resizedvantiq-reactjrennsoh88-react-native-scroll-indicatorjesh-calculationjordy-frijters-test-libkhaled-salem-custom-componentshermes-eslinthermes-transformmanan-react-native-expo-authorize-net@tlgeo/react-native-gdal@thinxviewx/core-rn@trackier/react-native-trackier@vidit-me/react-native-wheely@zotasys/nativeagent-get-agentaffinidi-auth-sdk-kernelact_mvvm_shop_cartawesome-module-kdbabel-plugin-syntax-hermes-parserarchlibrary@ponchodien/react-native-printer-imingenz-native-elementsframework_test_library_sixdeeframework_test_library_sixdee_newframework_test_library_sixdee_new_newgaurav-react-native-loopgamification-integration-new@syedt/hellosdk@taingo97/react-native-awesome-module@taingo97/react-native-bluetooth-escpos-printer@taingo97/react-native-bluetooth-xprinter@taingo97/react-native-generate-key-rsa@taingo97/react-native-key-rsa@taingo97/react-native-print-xprinter@taingo97/react-native-printer-imin@taingo97/react-native-rsa-expo@taingo97/react-native-sunmi-printerdomaincomponentdogandev-simple-toasteslint-plugin-react-compilerfawaterak-online-paymentfawatrak-online-paymentfluent.adflow.reactnativesdkfluent.adflow.reactnativesdk-alphaflow-remove-typesflow-nodeflow-upgradeflow-api-translatorfmsl@10102004tan/react-native-select-dropdown-v2@_nomtek/react-native-shimmer-animation@praella/localisationist@bemobile/fusion-server@aysea/react-native-ui-library@azalpacir/react-native-dhp-printer@baloochat/react-native-svg-uri@brantalikp/rn-resizecheckbox-componentcreate-flow-upgradedemo-test-scrndemo-app-pavanbiometric-st@affinidi/affinidi-auth-sdk-kernel@adembacaj/react-native-google-pay@adatechnology/react-native-android-getnet-pos@ahmed_shaban123/react-native-currencyinput@aruntestpayment/react-native-payu-payment@assystant/firebase@ali5049/react-native-buttons@ajaykewat/myboilerplate@amirdiafi/react-native-ios-haptics@aviinash_jha/react-native-test_multiplyjawwy_library_newjawy_library_v1gamification-jawwy-library
0.26.0

11 months ago

0.25.1

1 year ago

0.25.0

1 year ago

0.24.0

1 year ago

0.23.1

1 year ago

0.23.0

1 year ago

0.22.0

1 year ago

0.21.1

2 years ago

0.21.0

2 years ago

0.20.1

2 years ago

0.20.0

2 years ago

0.19.2

2 years ago

0.19.1

2 years ago

0.19.0

2 years ago

0.18.2

2 years ago

0.18.1

2 years ago

0.17.0

2 years ago

0.18.0

2 years ago

0.17.1

2 years ago

0.16.0

2 years ago

0.12.0

3 years ago

0.13.0

2 years ago

0.12.1

2 years ago

0.14.0

2 years ago

0.13.1

2 years ago

0.15.0

2 years ago

0.15.1

2 years ago

0.11.0

3 years ago

0.11.1

3 years ago

0.10.0

3 years ago

0.10.1

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

4 years ago

0.5.0

4 years ago

0.6.0

4 years ago

0.4.8

4 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago