MCPcopy Create free account
hub / github.com/Effect-TS/effect / fail

Function fail

packages/effect/src/internal/schema/codeExpression.ts:9–11  ·  view source on GitHub ↗
(position: number = tokens[index]?.start ?? source.length)

Source from the content-addressed store, hash-verified

7 const replacements: Array<{ readonly token: Token; readonly fragment: Fragment }> = []
8 let index = 0
9 const fail = (position: number = tokens[index]?.start ?? source.length): never => {
10 throw new Error(`Unsupported ${kind} syntax at offset ${position}: ${source}`)
11 }
12 const tokens = tokenize(source)
13 for (const token of tokens) {
14 if (token.kind === "identifier" && token.text.includes("\\")) fail(token.start)

Callers 5

parseFunction · 0.70
expectFunction · 0.70
identifierFunction · 0.70
typeMemberFunction · 0.70
expressionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected