Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the JavaScript parser compliant with JSON5 specs #43

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

JuliaGerasymenko
Copy link
Member

No description provided.

Copy link
Member

@belochub belochub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed only a part for now, and I've added some more tests that must pass but are failing with this implementation, check them out.

package-lock.json Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
Copy link
Member

@belochub belochub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some parts of the PR are not very clear to me, and parser is broken for different possible inputs I've provided. You should add tests for those inputs to ensure that they work correctly, before or after fixing the parser.

lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Show resolved Hide resolved
lib/serde-fallback.js Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
lib/serde-fallback.js Outdated Show resolved Hide resolved
@belochub belochub requested a review from nechaido June 21, 2019 10:04
// Parse a number
//
parseNumber() {
this.skipClutter();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each time this function is called clutter is already skipped. Because of this we can drop this line. Although we intend to have this as a part of a public API -- we should keep it. @belochub WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants