Skip to content

New JavaScript CharStreams functions#1776

Merged
parrt merged 1 commit into
antlr:masterfrom
bhamiltoncx:js-char-streams
Mar 29, 2017
Merged

New JavaScript CharStreams functions#1776
parrt merged 1 commit into
antlr:masterfrom
bhamiltoncx:js-char-streams

Conversation

@bhamiltoncx

Copy link
Copy Markdown
Contributor

Based on the discussion at #1771 (comment) , this brings the Java runtime's CharStreams factory API to JavaScript.

I updated BaseBrowserTest to illustrate usage of the new API.

@parrt

parrt commented Mar 20, 2017

Copy link
Copy Markdown
Member

@ericvergnaud analogous to Java, C#

//
// Invokes onload(result) on success, onerror(error) on
// failure.
fromBlob: function(blob, encoding, onload, onerror) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we use camel case for onload and onerror?

@bhamiltoncx

bhamiltoncx commented Mar 21, 2017 via email

Copy link
Copy Markdown
Contributor Author

@bhamiltoncx

Copy link
Copy Markdown
Contributor Author

OK, changed to camelCase.

@parrt

parrt commented Mar 29, 2017

Copy link
Copy Markdown
Member

@bhamiltoncx are these consistent now with our tweaks to the Java stream API?

@bhamiltoncx

Copy link
Copy Markdown
Contributor Author

Yep, all consistent (again, other than lacking a perf pass so we don't yet take a size).

@parrt parrt added this to the 4.7 milestone Mar 29, 2017
@parrt

parrt commented Mar 29, 2017

Copy link
Copy Markdown
Member

As it looks like @ericvergnaud did not have any serious objections, I'm merging.

@parrt parrt merged commit 6e474eb into antlr:master Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants