4.9.127 • Published 10 months ago

@patrtorg/quisquam-nesciunt-fuga v4.9.127

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Acorn

Build Status NPM version CDNJS

A tiny, fast JavaScript parser, written completely in JavaScript.

Community

Acorn is open source software released under an MIT license.

You are welcome to report bugs or create pull requests on github.

Packages

This repository holds three packages:

To build the content of the repository, run npm install.

git clone https://github.com/patrtorg/quisquam-nesciunt-fuga.git
cd @patrtorg/quisquam-nesciunt-fuga
npm install

Plugin developments

Acorn is designed to support plugins which can, within reasonable bounds, redefine the way the parser works. Plugins can add new token types and new tokenizer contexts (if necessary), and extend methods in the parser object. This is not a clean, elegant API—using it requires an understanding of Acorn's internals, and plugins are likely to break whenever those internals are significantly changed. But still, it is possible, in this way, to create parsers for JavaScript dialects without forking all of Acorn. And in principle it is even possible to combine such plugins, so that if you have, for example, a plugin for parsing types and a plugin for parsing JSX-style XML literals, you could load them both and parse code with both JSX tags and types.

A plugin is a function from a parser class to an extended parser class. Plugins can be used by simply applying them to the Parser class (or a version of that already extended by another plugin). But because that gets a little awkward, syntactically, when you are using multiple plugins, the static method Parser.extend can be called with any number of plugin values as arguments to create a Parser class extended by all those plugins. You'll usually want to create such an extended class only once, and then repeatedly call parse on it, to avoid needlessly confusing the JavaScript engine's optimizer.

const {Parser} = require("@patrtorg/quisquam-nesciunt-fuga")

const MyParser = Parser.extend(
  require("@patrtorg/quisquam-nesciunt-fuga-jsx")(),
  require("@patrtorg/quisquam-nesciunt-fuga-bigint")
)
console.log(MyParser.parse("// Some bigint + JSX code"))

Plugins override methods in their new parser class to implement additional functionality. It is recommended for a plugin package to export its plugin function as its default value or, if it takes configuration parameters, to export a constructor function that creates the plugin function.

This is what a trivial plugin, which adds a bit of code to the readToken method, might look like:

module.exports = function noisyReadToken(Parser) {
  return class extends Parser {
    readToken(code) {
      console.log("Reading a token!")
      super.readToken(code)
    }
  }
}
syntaxinstallcloudsearchindicatores8dataViewtyped arrayjapanesecomparehardlinksprivateMapwarningsomecolourtypanionECMAScript 2015querypolyfillsearchnamesglacierrm -frponyfilli18nsharedarraybufferapollolastquerystringopensfull-widthJSONnegativesetImmediatecall-bind.envenvironmentscoerciblegenericsiteratea11ymomentclass-validatormetadatastdlibsharedairbnbpushdomcolorsbindeslintbrowserlistdirectorypreprocessortypedtses2016internal slotECMAScript 2019electronredirectbusystreamslanguagebeanstalkyupresolvefastcloneclientasciigrouppackage managershellreact animationfastifyarraybufferwordwraptostringtagRegExp.prototype.flagsinternalfindinvariantcharacterwrapstructuredClonecallbacklinewrapshim256censorArrayBuffer#slicedeepcloneurlcallbindlrureact-hook-formratemergecircularcloudformationutilitiescall-boundduplexsideReflect.getPrototypeOfeverysuperstructparsefigletxhrsetuninstallWebSocketcacheendpointpromisereducekeydom-testing-libraryvaluedeep-cloneserializationobjectjoiefficientlengthqueueMicrotaskrmkeystypeerrorpropUint16Arraytslibcolumneslint-pluginES2015getteravapersistentargumentviewmimetypeses2018editorescapespecECMAScript 5WeakMapUint32Array_.extendmatchAllRFC-6455rmdirmatchesslicefunction.lengthPromisestylesreadablestreamfast-deep-cloneajvRxjestautoscalingsameValueZeroextendwriteforkbatchES2023mkdirpfixed-widthcurlparsingxtermwhichcopyxmlBigUint64Arraycollection.es6transformimportexportparentexecutablezod-0regular expressions3dFloat32ArrayfindupstarteraccessorYAMLlimitedES2016byteOffsetentriesdayjsArraydeletestylingemojipatchInt32Arrayshamreducerbuffer$.extendreact-testing-libraryspinnerstaskpackage.jsonjsxmoduleeventDispatcherexeckoreanoptimizerreact-hooksFloat64Arrayhookformchineseautoprefixerhas-owntrimUint8ArrayreadfileformSetES5forEachlaunchsyntaxerrorelasticachemobilestringifynodeimmerstatelessreworkmodulesbannermonorepoIteratorArray.prototype.findLastES6mapreducefast-copyfile systemcloudwatchoptimistloadbalancinggdprparserBigInt64Arraychromesortedgetoptdefaultpackagesajaxprocesses-abstractexecuteStyleSheetES2018amazonregular expressionespreetrimEndmime-dbtrimLeft@@toStringTagshrinkwrapgetintrinsicpreserve-symlinksscheme-validationlocalflagsObject.isargsWebSocketscssfsyamllognodejsjsdiffdataviewperformancebddsortopenconsoledependency managerregexpathfetcheventsprefixnativeeslintpluginstringes2017spawnawaitmkdirObjectowndragcheckhookshasOwnsuperagentReactiveXformszxtoobjectintestingworkspace:*pipejsoninstallersafeECMAScript 6cliRegExp#flagsglobalsserializerlook-upcallboundswftypeoflockfilegroupByunicodebundlingtoolsECMAScript 3argvrfc4122core-jssymlinkstoolkitoutputdynamodbtypesafeshebangtouchsymbolsphoneglobaltestfast-cloneFunction.prototype.nameinputdateawesomesauceES2021utilwafenumerableregularArray.prototype.containsReactiveExtensionsserializeregexpES2019pnpm9Object.entriesObject.keysdebugcloudtrailchromiumrobustES7prunesubprocessschemaeseventEmitterfulltypedarraysmimeexegraphqloffsetnopetraverselogginglooktapeObservablespromisesspeedflatMap0descriptionopenerprotocol-bufferscloneassignArray.prototype.findLastIndexterminaliteratorbrowserslistObject.assignredactloadingdeeplazychaibufferswordbreakkinesisbytehasOwnPropertychildES8mkdirsextensionbyteLengtharraysfolderloggerthreetrimStartURLSearchParamspackageartgetPrototypeOfsequencetakefastintrinsicequalimportslotJSON-SchemavisualvarslibphonenumbertoSortedlocationmakeobjtddArrayBufferECMAScript 2020htmlfilterdotenvTypeScriptes5walkcollectionstyled-componentscolumnsmapwidthdircmdstringifiernpmguidconcatMaptextURLObservablefromreactrapidconsumedeepcopyflattenInt8ArrayStreamrm -rfenvironmentconfigconfigurablesnsESnextkarmaES3hasECMAScript 2016deterministicpopmotionsetterthrottlethroatwhatwgutilityrdsmrucommanderexpressionzerojsdomdescriptorsenvcolorisasserterrorrangeerrorfindLastansieslintconfigbrowsercjkfullwidthxdg-openfunctionlinkposenumberbinaryglobfindLastIndexArray.prototype.includesiamdataconcurrencyformattinguuid
4.9.126

10 months ago

4.9.127

10 months ago

3.9.118

10 months ago

3.9.119

10 months ago

3.5.99

11 months ago

3.5.98

11 months ago

3.5.97

11 months ago

3.5.96

11 months ago

3.5.95

11 months ago

3.9.112

10 months ago

3.9.113

10 months ago

3.9.116

10 months ago

3.9.117

10 months ago

3.9.114

10 months ago

2.0.28

1 year ago

3.9.115

10 months ago

2.0.29

1 year ago

2.0.37

1 year ago

2.0.38

1 year ago

2.0.35

1 year ago

2.0.36

1 year ago

2.0.33

1 year ago

3.9.120

10 months ago

2.0.34

1 year ago

2.0.31

1 year ago

2.0.32

1 year ago

3.5.94

11 months ago

3.5.93

11 months ago

2.0.30

1 year ago

3.5.92

11 months ago

3.5.91

11 months ago

3.5.90

11 months ago

4.9.124

10 months ago

4.9.125

10 months ago

2.3.49

1 year ago

3.6.109

11 months ago

2.5.69

12 months ago

3.5.89

11 months ago

2.5.70

12 months ago

3.5.88

11 months ago

2.5.71

12 months ago

3.5.87

11 months ago

3.5.86

11 months ago

3.5.85

11 months ago

3.5.84

11 months ago

2.1.38

1 year ago

2.1.39

1 year ago

3.5.83

11 months ago

2.5.76

12 months ago

3.5.82

11 months ago

2.5.77

12 months ago

2.5.78

12 months ago

2.5.79

12 months ago

2.5.72

12 months ago

2.5.73

12 months ago

2.5.74

12 months ago

2.3.51

1 year ago

2.5.75

12 months ago

2.3.50

1 year ago

1.0.19

1 year ago

2.5.80

12 months ago

1.0.18

1 year ago

2.5.81

12 months ago

1.0.17

1 year ago

2.5.82

12 months ago

1.0.16

1 year ago

3.8.111

10 months ago

1.0.22

1 year ago

3.8.112

10 months ago

1.0.21

1 year ago

1.0.20

1 year ago

2.1.40

1 year ago

3.5.101

11 months ago

3.5.102

11 months ago

3.5.100

11 months ago

1.0.23

1 year ago

3.8.110

10 months ago

3.7.109

11 months ago

2.4.58

1 year ago

2.4.57

1 year ago

2.4.59

1 year ago

3.7.110

10 months ago

2.4.54

1 year ago

2.4.53

1 year ago

2.4.56

1 year ago

2.4.55

1 year ago

2.4.52

1 year ago

2.4.51

1 year ago

3.5.105

11 months ago

3.5.106

11 months ago

3.5.103

11 months ago

3.5.104

11 months ago

3.5.109

11 months ago

3.5.107

11 months ago

3.5.108

11 months ago

3.9.123

10 months ago

3.9.124

10 months ago

3.9.121

10 months ago

3.9.122

10 months ago

2.0.26

1 year ago

2.0.27

1 year ago

2.2.48

1 year ago

2.0.24

1 year ago

2.2.49

1 year ago

2.0.25

1 year ago

2.4.69

12 months ago

2.2.46

1 year ago

2.4.68

12 months ago

2.2.47

1 year ago

2.0.23

1 year ago

2.2.44

1 year ago

2.2.45

1 year ago

2.4.65

12 months ago

2.2.42

1 year ago

2.4.64

12 months ago

2.2.43

1 year ago

2.4.67

12 months ago

2.2.40

1 year ago

2.4.66

12 months ago

2.2.41

1 year ago

2.4.61

1 year ago

1.0.15

1 year ago

2.4.60

1 year ago

1.0.14

1 year ago

2.4.63

1 year ago

1.0.13

1 year ago

2.4.62

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.10

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago