-
Notifications
You must be signed in to change notification settings - Fork 6
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
embedAst
option to embed assertion's AST and tokens to make runtime side parser unnecessary
#13
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twada
changed the title
[WIP][experimental] Big refactring: Embed assertion's AST and tokens to make runtime side parser unnecessary
[WIP][experimental] Big refactoring: Embed assertion's AST and tokens to make runtime side parser unnecessary
Mar 9, 2016
This was referenced Mar 9, 2016
…runtime side parser unnecessary
…de parser unnecessary
…ing JSX in assertion
… range based since canonical form of assertion is always in one line
make clone module unnecessary
…n and AwaitExpression
twada
changed the title
[WIP][experimental] Big refactoring: Embed assertion's AST and tokens to make runtime side parser unnecessary
[WIP][experimental] Embed assertion's AST and tokens to make runtime side parser unnecessary
Mar 21, 2016
Reorganization of runtime side has done. Time to move forward. |
6 tasks
twada
changed the title
[WIP][experimental] Embed assertion's AST and tokens to make runtime side parser unnecessary
May 21, 2016
embedAst
flag to embed assertion's AST and tokens to make runtime side parser unnecessary
twada
changed the title
May 21, 2016
embedAst
flag to embed assertion's AST and tokens to make runtime side parser unnecessaryembedAst
option to embed assertion's AST and tokens to make runtime side parser unnecessary
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull-request aims to introduce opt-in
embedAst
option to embed assertion's AST and tokens to make runtime side parser unnecessary.Context
The runtime side of power-assert (not a transpilation side) depends on ECMAScript parser (currently
acorn
) to parse canonical assertion expression at runtime. Browserify embeds the parser into built bundle for web browsers.Problems
ECMAScript parser is huge. Therefore,
require
time downBundled parser is an ECMA standard compliant one. Therefore,
assert()
, parser causes parse error, power-assert runtime explodes immediately.Solution
Advantages
When this pull-req lands, you can write JSX tags inside assertions.
Downside
TODO
This feature might be released with power-assert 2.0.0 (if there are some breaking changes) <- No. There is no breaking changes.