Skip to content

Commit

Permalink
docs: fix GraphQL example
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpivkin committed May 9, 2024
1 parent 088bb72 commit 54aa555
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
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 54aa555

Please sign in to comment.