MCPcopy
hub / github.com/jquery/esprima / scanRegExp

Method scanRegExp

src/scanner.ts:1225–1243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1223 }
1224
1225 public scanRegExp(): RawToken {
1226 const start = this.index;
1227
1228 const pattern = this.scanRegExpBody();
1229 const flags = this.scanRegExpFlags();
1230 const value = this.testRegExp(pattern, flags);
1231
1232 return {
1233 type: Token.RegularExpression,
1234 value: '',
1235 pattern: pattern,
1236 flags: flags,
1237 regex: value,
1238 lineNumber: this.lineNumber,
1239 lineStart: this.lineStart,
1240 start: start,
1241 end: this.index
1242 };
1243 }
1244
1245 public lex(): RawToken {
1246 if (this.eof()) {

Callers 2

nextRegexTokenMethod · 0.80
getNextTokenMethod · 0.80

Calls 3

scanRegExpBodyMethod · 0.95
scanRegExpFlagsMethod · 0.95
testRegExpMethod · 0.95

Tested by

no test coverage detected