ECMAScript parsing infrastructure for multipurpose analysis

Related tags

Editors esprima
Overview

NPM version npm download Tests Coverage Status

Esprima (esprima.org, BSD license) is a high performance, standard-compliant ECMAScript parser written in ECMAScript (also popularly known as JavaScript). Esprima is created and maintained by Ariya Hidayat, with the help of many contributors.

Features

API

Esprima can be used to perform lexical analysis (tokenization) or syntactic analysis (parsing) of a JavaScript program.

A simple example on Node.js REPL:

> var esprima = require('esprima');
> var program = 'const answer = 42';

> esprima.tokenize(program);
[ { type: 'Keyword', value: 'const' },
  { type: 'Identifier', value: 'answer' },
  { type: 'Punctuator', value: '=' },
  { type: 'Numeric', value: '42' } ]
  
> esprima.parseScript(program);
{ type: 'Program',
  body:
   [ { type: 'VariableDeclaration',
       declarations: [Object],
       kind: 'const' } ],
  sourceType: 'script' }

For more information, please read the complete documentation.

You might also like...

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Dec 28, 2022

⛏ Mining Infrastructure Made Easy

⛏ Mining Infrastructure Made Easy

Carrot Pool Enterprise proof-of-work infrastructure & API for blockchain mining. Setup & Install » Demo · Report Bug · Roadmap · Updates Background Ca

Jan 5, 2023

Component infrastructure and Material Design components for Angular

Official components for Angular The Angular team builds and maintains both common UI components and tools to help you build your own custom components

Jan 3, 2023

AWS Serverless Event-driven Microservices with using AWS Lambda, AWS DynamoDB, AWS API Gateway, AWS EventBridge, AWS SQS, AWS CDK stands for Cloud Development Kit for IaC — Infrastructure as Code tool and AWS CloudWatch for monitoring.

AWS Serverless Event-driven Microservices with using AWS Lambda, AWS DynamoDB, AWS API Gateway, AWS EventBridge, AWS SQS, AWS CDK stands for Cloud Development Kit for IaC — Infrastructure as Code tool and AWS CloudWatch for monitoring.

Serverless Event-driven E-commerce Microservices UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository - https://www.udemy.com/c

Jan 3, 2023

Easy-to-use CDK constructs for monitoring your AWS infrastructure

CDK Monitoring Constructs Easy-to-use CDK constructs for monitoring your AWS infrastructure. Easily add commonly-used alarms using predefined properti

Jan 6, 2023

Open source data infrastructure platform. Designed for developers, built for speed.

Open source data infrastructure platform. Designed for developers, built for speed.

Gigahex is a web based data infrastructure platform to deploy and manage Apache Spark™, Apache Kafka and Apache Hadoop clusters. Currently, it support

Dec 6, 2022

Open source data infrastructure platform. Designed for developers, built for speed.

Open source data infrastructure platform. Designed for developers, built for speed.

Gigahex is a web based data infrastructure platform to deploy and manage Apache Spark™, Apache Kafka and Apache Hadoop clusters. Currently, it support

Apr 1, 2022

PEARL (Planetary Computer Land Cover Mapping) Platform API and Infrastructure

PEARL (Planetary Computer Land Cover Mapping) Platform API and Infrastructure

PEARL API & Infrastructure PEARL is a landcover mapping platform that uses human in the loop machine learning approach. This repository contains the A

Dec 23, 2022

A tool for managing production-grade cloud clusters, infrastructure as code

Cloudy Description Cloudy is an "infrastructure as code" tool for managing production-grade cloud clusters. It's based on Pulumi that mostly using Ter

Jan 1, 2023

AWSGoat : A Damn Vulnerable AWS Infrastructure

AWSGoat : A Damn Vulnerable AWS Infrastructure

AWS GOAT Compromising an organization's cloud infrastructure is like sitting on a gold mine for attackers. And sometimes, a simple misconfiguration or

Dec 28, 2022

Open source infrastructure for scalable, reliable native integrations in B2B SaaS products

Open source infrastructure for scalable, reliable native integrations in B2B SaaS products

Open-source infrastructure for native integrations Native, customer-facing integrations for your B2B SaaS made simple, reliable and extensible. Explor

Jan 2, 2023

This repository contains different infrastructure components that are used in different projects here at NaN Labs.

Infrastructure Reference Changelog | Contributing This repository contains different infrastructure components that are used in different projects her

Dec 15, 2022

Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan CLI Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose. What is A

Aug 17, 2022

ChainJet is a workflow automation platform specialized in blockchain and cloud infrastructure.

A workflow automation platform specialized on blockchain, with more than 300 integrations. Description ChainJet is a workflow automation platform spec

Dec 24, 2022

FieldVal - multipurpose validation library. Supports both sync and async validation.

FieldVal-JS The FieldVal-JS library allows you to easily validate data and provide readable and structured error reports. Documentation and Examples D

Sep 24, 2022

A multipurpose Discord-bot created using discord.js.

Flame A multipurpose Discord-bot with music, economy, utils, and also auto-moderation. Flame is a powerfull, multipurpose and fully modular Discord-bo

Nov 14, 2021

Meet Muffin - a multipurpose, customizable and open source Discord bot with bunch of useful features for your server!

Meet Muffin - a multipurpose, customizable and open source Discord bot with bunch of useful features for your server!

Meet Muffin - a multipurpose, highly customizable and open source Discord bot with bunch of useful features for your server! Self-hosting notice While

Oct 21, 2021

A multipurpose transporting app that contains, loads databases, documentation and more.

TransportingApp This project was generated with Angular CLI version 12.0.3. Development server Run ng serve for a dev server. Navigate to http://local

Jan 21, 2022

Denky is a multipurpose Discord bot, build with Node.js, TypeScript and discord.js.

🤖 Denky Bot Denky is a brazilian Discord bot, build with Node.js, TypeScript and discord.js. ⚙️ How to Create a Discord application. Guide Install No

Apr 6, 2022
Comments
  • Something's wrong with your github repo!

    Something's wrong with your github repo!

    Hey! This pull request isn't actually a pull request, but a way of notifying you that your github repo is messed up. A clean git clone of your repo has unstaged changes which is breaking some things (including npm install).

    :) 0 marguerite @ marguerite-1127 in ~/software
    |  | $ g clone [email protected]:ariya/esprima.git
    Cloning into 'esprima'...
    remote: Counting objects: 14542, done.
    remote: Compressing objects: 100% (15/15), done.
    remote: Total 14542 (delta 2), reused 0 (delta 0), pack-reused 14524
    Receiving objects: 100% (14542/14542), 47.79 MiB | 8.10 MiB/s, done.
    Resolving deltas: 100% (9747/9747), done.
    Checking connectivity... done.
    
    :) 0 marguerite @ marguerite-1127 in ~/software
    |  | $ cd esprima/
    
    :) 0 marguerite @ marguerite-1127 in ~/software/esprima
    | master | $ g st
     M test/fixtures/JSX/multiline-crlf-text.js
     M test/fixtures/comment/migrated_0011.js
     M test/fixtures/expression/primary/literal/string/migrated_0017.js
     M test/fixtures/invalid-syntax/migrated_0153.js
     M test/fixtures/invalid-syntax/migrated_0155.js
     M test/fixtures/invalid-syntax/migrated_0159.js
    
    opened by margueritepd 3
  • Changed npmignore to add the whole test directory and remove innecessary directories

    Changed npmignore to add the whole test directory and remove innecessary directories

    The test directory isn't needed at all when installed this package as a dependency and are 8MB we could save from network and disk. Also the .git directory is ignored by default, so there's no need to add it.

    opened by rubennorte 2
  • SOS esprima 404 error

    SOS esprima 404 error

    Hi @ariya how are you? I'm sorry for opening this PR, but since I haven't found a place to post an issue with esprima, it was the only way I found to post this problem.

    I'm trying to install all dependencies in my react project, but when I run npm install I'm getting some errors related to esprima:

    npm ERR! 404 Not Found - GET https://codeload.github.com/ariya/esprima/legacy.tar.gz/master npm ERR! npm ERR! 404 npm ERR! npm ERR! 404 'esprima@https://github.com/ariya/esprima/tarball/master' is not in the npm registry. npm ERR! npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! npm ERR! 404 npm ERR! npm ERR! 404 Note that you can also install from a npm ERR! npm ERR! 404 tarball, folder, http url, or git url.

    Can you please help me with this error?

    opened by CaiqueCoelho 1
Owner
Ariya Hidayat
Open-source
Ariya Hidayat
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Overview of ECMAScript 6 features

ECMAScript 6 git.io/es6features Introduction ECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard. ES6 is a s

Luke Hoban 29.1k Jan 4, 2023
ECMAScript 6: Feature Overview & Comparison

es6-features.org ECMAScript 6: Feature Overview & Comparison Copyright (c) 2015-2017 Ralf S. Engelschall <[email protected]> <@engelschall> Partiall

Dr. Ralf S. Engelschall 6.2k Dec 27, 2022
ECMAScript 5/6/7 compatibility tables

ECMAScript compatibility tables Editing the tests Edit the data-es5.js, data-es6.js, data-esnext.js, or data-non-standard.js files to adjust the tests

Juriy Zaytsev 4.2k Dec 25, 2022
ECMAScript code beautifier/formatter

esformatter ECMAScript code beautifier/formatter. Important This tool is still missing support for many important features. Please report any bugs you

Miller Medeiros 968 Nov 1, 2022
Curso de ECMAScript 6+ en Platzi

Curso de ECMAScript 6+ JavaScript es el lenguaje más utilizado para desarrollo de aplicaciones web, principalmente en el frontend. Cada año, ECMA Inte

Edward Brito Diaz 3 Feb 12, 2022
🎩 Coverage for EcmaScript Modules

?? ESCover Coverage for EcmaScript Modules based on ?? Putout and loaders. Why another coverage tool? When you want to use ESM in Node.js without tran

coderaiser 4 Jun 10, 2022
ESLint plugin about ECMAScript syntactic features.

eslint-plugin-es-x ESLint plugin which disallows each ECMAScript syntax. Forked from eslint-plugin-es. As the original repository seems no longer main

Yosuke Ota 69 Dec 6, 2022