MCPcopy
hub / github.com/dgraph-io/dgraph / Run

Method Run

lex/lexer.go:196–203  ·  view source on GitHub ↗

Run executes the given StateFn on the lexer and returns the lexer.

(f StateFn)

Source from the content-addressed store, hash-verified

194
195// Run executes the given StateFn on the lexer and returns the lexer.
196func (l *Lexer) Run(f StateFn) *Lexer {
197 for state := f; state != nil; {
198 // The following statement is useful for debugging.
199 // fmt.Printf("Func: %v\n", runtime.FuncForPC(reflect.ValueOf(state).Pointer()).Name())
200 state = state(l)
201 }
202 return l
203}
204
205// Errorf returns the error state function.
206func (l *Lexer) Errorf(format string, args ...interface{}) StateFn {

Callers 15

ParseMutationFunction · 0.95
ParseDQLFunction · 0.95
ParseWithNeedVarsFunction · 0.95
TestQueryLexingFunction · 0.95
TestMutationLexingFunction · 0.95
TestNewSchemaQueryFunction · 0.95
TestAbruptSchemaQueryFunction · 0.95
TestAbruptMutationFunction · 0.95
TestVariables1Function · 0.95
TestVariables2Function · 0.95
TestVariablesDefaultFunction · 0.95

Calls 1

stateStruct · 0.50

Tested by 15

TestQueryLexingFunction · 0.76
TestMutationLexingFunction · 0.76
TestNewSchemaQueryFunction · 0.76
TestAbruptSchemaQueryFunction · 0.76
TestAbruptMutationFunction · 0.76
TestVariables1Function · 0.76
TestVariables2Function · 0.76
TestVariablesDefaultFunction · 0.76
TestIRIRefFunction · 0.76
TestLangSupportFunction · 0.76
TestMultiLangSupportFunction · 0.76