Skip to content

Commit

Permalink
docs: fix GraphQL example (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin committed May 9, 2024
1 parent 088bb72 commit 5f96b07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -526,12 +526,12 @@ type Value struct {
}

var (
graphQLLexer = lexer.MustSimple([]lexer.Rule{
{"Comment", `(?:#|//)[^\n]*\n?`, nil},
{"Ident", `[a-zA-Z]\w*`, nil},
{"Number", `(?:\d*\.)?\d+`, nil},
{"Punct", `[-[!@#$%^&*()+_={}\|:;"'<,>.?/]|]`, nil},
{"Whitespace", `[ \t\n\r]+`, nil},
graphQLLexer = lexer.MustSimple([]lexer.SimpleRule{
{"Comment", `(?:#|//)[^\n]*\n?`},
{"Ident", `[a-zA-Z]\w*`},
{"Number", `(?:\d*\.)?\d+`},
{"Punct", `[-[!@#$%^&*()+_={}\|:;"'<,>.?/]|]`},
{"Whitespace", `[ \t\n\r]+`},
})
parser = participle.MustBuild[File](
participle.Lexer(graphQLLexer),
Expand Down

0 comments on commit 5f96b07

Please sign in to comment.