@@ -68,14 +68,14 @@ export interface JSONScanner {
68
68
* The length of the last read token.
69
69
*/
70
70
getTokenLength(): number ;
71
- /**
72
- * The zero-based start line number of the last read token.
73
- */
74
- getTokenLine(): number ;
75
- /**
76
- * The zero-based character (start column) of the last read token.
77
- */
78
- getTokenCharacter(): number ;
71
+ /**
72
+ * The zero-based start line number of the last read token.
73
+ */
74
+ getTokenLine(): number ;
75
+ /**
76
+ * The zero-based character (start column) of the last read token.
77
+ */
78
+ getTokenCharacter(): number ;
79
79
/**
80
80
* An error code of the last scan.
81
81
*/
@@ -101,42 +101,42 @@ export declare function parse(text: string, errors?: {error: ParseErrorCode;}[],
101
101
export declare function visit(text : string , visitor : JSONVisitor , options ? : ParseOptions ): any ;
102
102
103
103
export interface JSONVisitor {
104
- /**
105
- * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace.
106
- */
107
- onObjectBegin? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
108
- /**
109
- * Invoked when a property is encountered. The offset and length represent the location of the property name.
110
- */
111
- onObjectProperty? : (property : string , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
112
- /**
113
- * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace.
114
- */
115
- onObjectEnd? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
116
- /**
117
- * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket.
118
- */
119
- onArrayBegin? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
120
- /**
121
- * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket.
122
- */
123
- onArrayEnd? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
124
- /**
125
- * Invoked when a literal value is encountered. The offset and length represent the location of the literal value.
126
- */
127
- onLiteralValue? : (value : any , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
128
- /**
129
- * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator.
130
- */
131
- onSeparator? : (character : string , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
132
- /**
133
- * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment.
134
- */
135
- onComment? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
136
- /**
137
- * Invoked on an error.
138
- */
139
- onError? : (error : ParseErrorCode , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
104
+ /**
105
+ * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace.
106
+ */
107
+ onObjectBegin? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
108
+ /**
109
+ * Invoked when a property is encountered. The offset and length represent the location of the property name.
110
+ */
111
+ onObjectProperty? : (property : string , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
112
+ /**
113
+ * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace.
114
+ */
115
+ onObjectEnd? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
116
+ /**
117
+ * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket.
118
+ */
119
+ onArrayBegin? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
120
+ /**
121
+ * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket.
122
+ */
123
+ onArrayEnd? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
124
+ /**
125
+ * Invoked when a literal value is encountered. The offset and length represent the location of the literal value.
126
+ */
127
+ onLiteralValue? : (value : any , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
128
+ /**
129
+ * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator.
130
+ */
131
+ onSeparator? : (character : string , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
132
+ /**
133
+ * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment.
134
+ */
135
+ onComment? : (offset : number , length : number , startLine : number , startCharacter : number ) => void ;
136
+ /**
137
+ * Invoked on an error.
138
+ */
139
+ onError? : (error : ParseErrorCode , offset : number , length : number , startLine : number , startCharacter : number ) => void ;
140
140
}
141
141
142
142
/**
0 commit comments