()
| 98 | } |
| 99 | |
| 100 | func (p *parser) parseVariableDefinition() *VariableDefinition { |
| 101 | var def VariableDefinition |
| 102 | def.Position = p.peekPos() |
| 103 | def.Comment = p.comment |
| 104 | def.Variable = p.parseVariable() |
| 105 | |
| 106 | p.expect(lexer.Colon) |
| 107 | |
| 108 | def.Type = p.parseTypeReference() |
| 109 | |
| 110 | if p.skip(lexer.Equals) { |
| 111 | def.DefaultValue = p.parseValueLiteral(true) |
| 112 | } |
| 113 | |
| 114 | def.Directives = p.parseDirectives(false) |
| 115 | |
| 116 | return &def |
| 117 | } |
| 118 | |
| 119 | func (p *parser) parseVariable() string { |
| 120 | p.expect(lexer.Dollar) |
no test coverage detected