Skip to content
This repository was archived by the owner on Sep 27, 2020. It is now read-only.

Commit 8f63dcb

Browse files
committed
Update antlr config to user newer InputStream object. Fixes UTF-8 range errors
1 parent 5e14b90 commit 8f63dcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ParserError.prototype.name = 'ParserError'
2424
function tokenize(input, options) {
2525
options = options || {}
2626

27-
const chars = antlr4.CharStreams.fromString(input)
27+
const chars = antlr4.InputStream(input)
2828
const lexer = new SolidityLexer(chars)
2929
const tokens = new antlr4.CommonTokenStream(lexer)
3030

@@ -34,7 +34,7 @@ function tokenize(input, options) {
3434
function parse(input, options) {
3535
options = options || {}
3636

37-
const chars = antlr4.CharStreams.fromString(input)
37+
const chars = antlr4.InputStream(input)
3838

3939
const listener = new ErrorListener()
4040

0 commit comments

Comments
 (0)