()
| 517 | } |
| 518 | |
| 519 | func (self *_parser) parseObjectLiteral() *ast.ObjectLiteral { |
| 520 | var value []ast.Property |
| 521 | idx0 := self.expect(token.LEFT_BRACE) |
| 522 | for self.token != token.RIGHT_BRACE && self.token != token.EOF { |
| 523 | property := self.parseObjectProperty() |
| 524 | if property != nil { |
| 525 | value = append(value, property) |
| 526 | } |
| 527 | if self.token != token.RIGHT_BRACE { |
| 528 | self.expect(token.COMMA) |
| 529 | } else { |
| 530 | break |
| 531 | } |
| 532 | } |
| 533 | idx1 := self.expect(token.RIGHT_BRACE) |
| 534 | |
| 535 | return &ast.ObjectLiteral{ |
| 536 | LeftBrace: idx0, |
| 537 | RightBrace: idx1, |
| 538 | Value: value, |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | func (self *_parser) parseArrayLiteral() *ast.ArrayLiteral { |
| 543 |
no test coverage detected