MCPcopy Create free account
hub / github.com/mozilla/rhino / parse

Method parse

rhino/src/main/java/org/mozilla/javascript/NativeJSON.java:61–72  ·  view source on GitHub ↗
(
            Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)

Source from the content-addressed store, hash-verified

59 }
60
61 private static Object parse(
62 Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) {
63 String jtext = ScriptRuntime.toString(args, 0);
64 Object reviver = null;
65 if (args.length > 1) {
66 reviver = args[1];
67 }
68 if (reviver instanceof Callable) {
69 return parse(cx, f.getDeclarationScope(), jtext, (Callable) reviver);
70 }
71 return parse(cx, f.getDeclarationScope(), jtext);
72 }
73
74 private static Object stringify(
75 Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) {

Callers

nothing calls this directly

Calls 8

toStringMethod · 0.95
constructErrorMethod · 0.95
putMethod · 0.95
walkMethod · 0.95
parseValueMethod · 0.80
getDeclarationScopeMethod · 0.65
getMessageMethod · 0.65
newObjectMethod · 0.45

Tested by

no test coverage detected