MCPcopy Index your code
hub / github.com/json5/json5 / default

Function default

lib/parse.js:133–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131
132const lexStates = {
133 default () {
134 switch (c) {
135 case '\t':
136 case '\v':
137 case '\f':
138 case ' ':
139 case '\u00A0':
140 case '\uFEFF':
141 case '\n':
142 case '\r':
143 case '\u2028':
144 case '\u2029':
145 read()
146 return
147
148 case '/':
149 read()
150 lexState = 'comment'
151 return
152
153 case undefined:
154 read()
155 return newToken('eof')
156 }
157
158 if (util.isSpaceSeparator(c)) {
159 read()
160 return
161 }
162
163 // This code is unreachable.
164 // if (!lexStates[parseState]) {
165 // throw invalidLexState(parseState)
166 // }
167
168 return lexStates[parseState]()
169 },
170
171 comment () {
172 switch (c) {

Callers

nothing calls this directly

Calls 2

readFunction · 0.85
newTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…