forked from dgraph-io/dgraph
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support comments in schema (dgraph-io#3133)
* schema/state.go: add comment state to lexer This adds comment detection to lexer. A comment starts with # and ends with new line or EOF. When new line is detected, it's emitted so the caller can handle it. If EOF is found, that should end further parsing. * schema/parse_test.go: add test for comments in schema types * gql/parser.go: fixed typo * schema/state.go: rename func lexComment to lexTextComment Package gql has another function called lexComment that works slightly different to this one, so I renamed this one to avoid confusion.
- Loading branch information
1 parent
b4f6c87
commit 57e29fe
Showing
3 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters