Skip to content

New JavaScript CharStreams functions#1776

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

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

Conversation

@bhamiltoncx
Copy link
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
Copy link
Member

parrt commented Mar 20, 2017

@ericvergnaud analogous to Java, C#

//
// Invokes onload(result) on success, onerror(error) on
// failure.
fromBlob: function(blob, encoding, onload, onerror) {
Copy link
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
Copy link
Contributor Author

bhamiltoncx commented Mar 21, 2017 via email

@bhamiltoncx
Copy link
Contributor Author

OK, changed to camelCase.

@parrt
Copy link
Member

parrt commented Mar 29, 2017

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

@bhamiltoncx
Copy link
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
Copy link
Member

parrt commented Mar 29, 2017

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