File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package net.quickwrite
2
2
3
3
import net.quickwrite.lexer.JSONLexeme
4
4
import net.quickwrite.lexer.JSONLexemeType.*
5
+ import net.quickwrite.lexer.JSONLexer
5
6
import net.quickwrite.lexer.StringJSONLexer
6
7
import java.math.BigDecimal
7
8
import java.util.Stack
@@ -14,10 +15,8 @@ private enum class State {
14
15
}
15
16
16
17
@Throws(JSONParseException ::class )
17
- fun jsonParse (input : String ): Any? {
18
- val lexer = StringJSONLexer (input)
19
-
20
- var state = State .START
18
+ fun jsonParse (lexer : JSONLexer ): Any? {
19
+ var state = State .START ;
21
20
22
21
var token: JSONLexeme
23
22
@@ -211,3 +210,8 @@ fun jsonParse(input: String): Any? {
211
210
212
211
return result
213
212
}
213
+
214
+ @Throws(JSONParseException ::class )
215
+ fun jsonParse (input : String ): Any? {
216
+ return jsonParse(StringJSONLexer (input))
217
+ }
You can’t perform that action at this time.
0 commit comments