0.26.0 • Published 6 months ago

hermes-parser v0.26.0

Weekly downloads
24
License
MIT
Repository
github
Last release
6 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-react@cs6/react-native-test-native-view-library@con-test/react-native-concent-common@damian.lnc/core@damruravihara/react-native-testing-package@bemobile/fusion-server@praella/localisationist@routebuddies/react-native-mapbox-navigationjrennsoh88-react-native-scroll-indicatorjesh-calculationjordy-frijters-test-libkhaled-salem-custom-componentsjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwyreact-native-experts-sdktest_lib_module_aarquickcapture_react_nativern-agora-ios-mreact-native-omental-frameworkreact-native-sixdee_test_lib@amirdiafi/react-native-ios-haptics@assystant/firebase@aviinash_jha/react-native-test_multiply@affinidi/affinidi-auth-sdk-kernel@ali5049/react-native-buttons@ajaykewat/myboilerplate@alanastor/robylon-react-native-sdk@baloochat/react-native-svg-uri@aysea/react-native-ui-library@brantalikp/rn-resize@10102004tan/react-native-select-dropdown-v2@adatechnology/react-native-android-getnet-pos@adembacaj/react-native-google-pay@_nomtek/react-native-shimmer-animation@azalpacir/react-native-dhp-printeryarn-react-hook-form@hyext/matrix@idas1/ui-component-lib@edwinpb/scany@glyw/react-native-tabbed-section-list@labiebhn_/react-native-multiplier@lehuyaa/my-assets@ndjoe/react-native-bluetooth-escpos-printer@enkeledi/react-native-week-month-date-picker@extrieve_technologies/quickcapture_react_native@js07/pd-convert-actions@jfilipe-sparta/react-native-module_2@oiti/rn-liveness2d@react-native/codegen@react-native-ui-design/button@react-native/metro-babel-transformer@ponchodien/react-native-printer-imin@npm_fluentco/adflow-react-native-sdk@sidghimire/react-native-mapbox-navigation@sephriot/react-native-persistable-uri@rnx-kit-metro/metro-babel-transformer@rnx-kit-metro/metro-react-native-babel-transformer@rnx-kit-metro/metro@sridharetikala/react-native-rn-lib-custom-componentsmetro-react-native-interop-toolsmetro-react-native-babel-transformermetrometro-babel-transformernative-date-picker-modulenative-modal-damage-vehicleori-bot-react-nativereact-native-auth-service-clientreact-native-android-video-player-viewreact-native-android-viewreact-native-bluetooth-device-detectreact-native-dropdown-multiselect-listreact-native-dummy-view
0.26.0

6 months ago

0.25.1

7 months ago

0.25.0

8 months ago

0.24.0

8 months ago

0.23.1

11 months ago

0.23.0

11 months ago

0.22.0

1 year ago

0.21.1

1 year ago

0.21.0

1 year ago

0.20.1

1 year ago

0.20.0

1 year ago

0.19.2

1 year ago

0.19.1

1 year ago

0.19.0

1 year ago

0.18.2

1 year ago

0.18.1

1 year 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

2 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

2 years ago

0.11.1

2 years ago

0.10.0

2 years ago

0.10.1

2 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.5.0

4 years ago

0.6.0

3 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago