(pos Pos)
| 333 | } |
| 334 | |
| 335 | func (p *Parser) tryParseWithTimeout(pos Pos) (*WithTimeoutClause, error) { |
| 336 | if !p.tryConsumeKeywords(KeywordWith) { |
| 337 | return nil, nil // nolint |
| 338 | } |
| 339 | if err := p.expectKeyword(KeywordTimeout); err != nil { |
| 340 | return nil, err |
| 341 | } |
| 342 | |
| 343 | withTimeout := &WithTimeoutClause{WithTimeoutPos: pos} |
| 344 | |
| 345 | if p.matchTokenKind(TokenKindInt) { |
| 346 | decimalNumber, err := p.parseDecimal(p.Pos()) |
| 347 | if err != nil { |
| 348 | return nil, err |
| 349 | } |
| 350 | withTimeout.Number = decimalNumber |
| 351 | } |
| 352 | |
| 353 | return withTimeout, nil |
| 354 | } |
no test coverage detected