Skip to content

Commit abac2af

Browse files
authored
Don't use utf decoding...these are just ints (#3573)
1 parent c693010 commit abac2af

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

runtime/Go/antlr/atn_deserializer.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package antlr
77
import (
88
"fmt"
99
"strconv"
10-
"unicode/utf16"
1110
)
1211

1312
var SerializedVersion = 4
@@ -24,7 +23,7 @@ type BlockStartStateIntPair struct {
2423

2524
type ATNDeserializer struct {
2625
deserializationOptions *ATNDeserializationOptions
27-
data []rune
26+
data []uint16
2827
pos int
2928
}
3029

@@ -47,7 +46,7 @@ func stringInSlice(a string, list []string) int {
4746
}
4847

4948
func (a *ATNDeserializer) DeserializeFromUInt16(data []uint16) *ATN {
50-
a.data = utf16.Decode(data)
49+
a.data = data
5150
a.pos = 0
5251
a.checkVersion()
5352

0 commit comments

Comments
 (0)