MCPcopy
hub / github.com/babel/babel / expect

Function expect

packages/babel-parser/src/parser/util.ts:155–159  ·  view source on GitHub ↗
(type: TokenType, loc?: Position | null)

Source from the content-addressed store, hash-verified

153 // raise an unexpected token error at given pos.
154
155 expect(type: TokenType, loc?: Position | null): void {
156 if (!this.eat(type)) {
157 this.unexpected(loc, type);
158 }
159 }
160
161 // tryParse will clone parser state.
162 // It is expensive and should be used with cautions

Callers 15

exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50
exec.jsFile · 0.50

Calls

no outgoing calls

Tested by 15

testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testFunction · 0.40
testMethod · 0.40
testMethod · 0.40
testMethod · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…