Coder Social home page Coder Social logo

oxc-project / javascript-parser-in-rust Goto Github PK

View Code? Open in Web Editor NEW
462.0 462.0 24.0 6.69 MB

Tutorial on writing a JavaScript Parser in Rust

Home Page: https://oxc-project.github.io/javascript-parser-in-rust/

JavaScript 42.34% TypeScript 36.26% CSS 20.53% Shell 0.87%
javascript parser rust

javascript-parser-in-rust's People

Contributors

ahabhgk avatar boshen avatar jason89521 avatar lino-levan avatar makotot avatar mysteryven avatar nissy-dev avatar nozomuikuta avatar rewrite0w0 avatar suica avatar ubugeeei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javascript-parser-in-rust's Issues

AST question, make working with Expression enum easier

In the tutorial it's suggested to represent Expression as an enum and each expression has it's variant. Inside all variants we are storing a node.

I'm trying to work with use the AST, and it's not easy to access the node field without deconstructing to a variant.

I'm curios what happens if we change the representation to this:

pub struct Expression {
	node: Node,
	expression_kind: ExpressionKind,
}

pub enum ExpressionKind {
    SomeExpression(SomeExpression),
}

Then we can pass this type around in functions and access the node easily.

Does this have negative performance impact or other issues?

[ask] I would like to create a pull request for a translation, but what would be the appropriate granularity for the PR?

Thank you for the wonderful project.
Since discussions haven’t been opened, I am asking this question through an issue.

I know that part of this project has been translated into Japanese, and I would like to create PRs for translating the remaining parts.
What granularity of PRs do you request us?

• Everything all at once
• Each page individually
• Others

I would be grateful if you could tell me the method that would best suit your preferences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.