< prev index next >
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/JSONParser.java
Print this page
rev 1309 : 8085885: address Javadoc warnings in Nashorn source code
@@ -45,11 +45,12 @@
import jdk.nashorn.internal.scripts.JO;
import static jdk.nashorn.internal.parser.TokenType.STRING;
/**
- * Parses JSON text and returns the corresponding IR node. This is derived from the objectLiteral production of the main parser.
+ * Parses JSON text and returns the corresponding IR node. This is derived from
+ * the objectLiteral production of the main parser.
*
* See: 15.12.1.2 The JSON Syntactic Grammar
*/
public class JSONParser {
@@ -68,24 +69,27 @@
private static final int STATE_EMPTY = 0;
private static final int STATE_ELEMENT_PARSED = 1;
private static final int STATE_COMMA_PARSED = 2;
/**
- * Constructor
+ * Constructor.
+ *
* @param source the source
* @param global the global object
+ * @param dualFields whether the parser should regard dual field representation
*/
public JSONParser(final String source, final Global global, final boolean dualFields) {
this.source = source;
this.global = global;
this.length = source.length();
this.dualFields = dualFields;
}
/**
- * Implementation of the Quote(value) operation as defined in the ECMA script spec
- * It wraps a String value in double quotes and escapes characters within in
+ * Implementation of the Quote(value) operation as defined in the ECMAscript
+ * spec. It wraps a String value in double quotes and escapes characters
+ * within.
*
* @param value string to quote
*
* @return quoted and escaped string
*/
< prev index next >