OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.parser; | 8 library engine.parser; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
(...skipping 4580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4591 if (StringUtilities.startsWith3(commentToken.lexeme, 0, 0x2F, 0x2A, 0x2A
)) { | 4591 if (StringUtilities.startsWith3(commentToken.lexeme, 0, 0x2F, 0x2A, 0x2A
)) { |
4592 commentTokens.clear(); | 4592 commentTokens.clear(); |
4593 commentTokens.add(commentToken); | 4593 commentTokens.add(commentToken); |
4594 } | 4594 } |
4595 } | 4595 } |
4596 commentToken = commentToken.next; | 4596 commentToken = commentToken.next; |
4597 } | 4597 } |
4598 if (commentTokens.isEmpty) { | 4598 if (commentTokens.isEmpty) { |
4599 return null; | 4599 return null; |
4600 } | 4600 } |
4601 List<Token> tokens = new List.from(commentTokens); | 4601 List<CommentReference> references = _parseCommentReferences(commentTokens); |
4602 List<CommentReference> references = _parseCommentReferences(tokens); | 4602 return Comment.createDocumentationCommentWithReferences(commentTokens, refer
ences); |
4603 return Comment.createDocumentationCommentWithReferences(tokens, references); | |
4604 } | 4603 } |
4605 | 4604 |
4606 /** | 4605 /** |
4607 * Parse a do statement. | 4606 * Parse a do statement. |
4608 * | 4607 * |
4609 * <pre> | 4608 * <pre> |
4610 * doStatement ::= | 4609 * doStatement ::= |
4611 * 'do' statement 'while' '(' expression ')' ';' | 4610 * 'do' statement 'while' '(' expression ')' ';' |
4612 * </pre> | 4611 * </pre> |
4613 * | 4612 * |
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6435 } | 6434 } |
6436 } | 6435 } |
6437 } else if (_currentToken.isOperator) { | 6436 } else if (_currentToken.isOperator) { |
6438 components.add(andAdvance); | 6437 components.add(andAdvance); |
6439 } else if (_tokenMatchesKeyword(_currentToken, Keyword.VOID)) { | 6438 } else if (_tokenMatchesKeyword(_currentToken, Keyword.VOID)) { |
6440 components.add(andAdvance); | 6439 components.add(andAdvance); |
6441 } else { | 6440 } else { |
6442 _reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []); | 6441 _reportErrorForCurrentToken(ParserErrorCode.MISSING_IDENTIFIER, []); |
6443 components.add(_createSyntheticToken(TokenType.IDENTIFIER)); | 6442 components.add(_createSyntheticToken(TokenType.IDENTIFIER)); |
6444 } | 6443 } |
6445 return new SymbolLiteral(poundSign, new List.from(components)); | 6444 return new SymbolLiteral(poundSign, components); |
6446 } | 6445 } |
6447 | 6446 |
6448 /** | 6447 /** |
6449 * Parse a throw expression. | 6448 * Parse a throw expression. |
6450 * | 6449 * |
6451 * <pre> | 6450 * <pre> |
6452 * throwExpression ::= | 6451 * throwExpression ::= |
6453 * 'throw' expression | 6452 * 'throw' expression |
6454 * </pre> | 6453 * </pre> |
6455 * | 6454 * |
(...skipping 3070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9526 return trampoline(target, arguments[0], arguments[1]); | 9525 return trampoline(target, arguments[0], arguments[1]); |
9527 case 3: | 9526 case 3: |
9528 return trampoline(target, arguments[0], arguments[1], arguments[2]); | 9527 return trampoline(target, arguments[0], arguments[1], arguments[2]); |
9529 case 4: | 9528 case 4: |
9530 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); | 9529 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); |
9531 default: | 9530 default: |
9532 throw new IllegalArgumentException("Not implemented for > 4 arguments"); | 9531 throw new IllegalArgumentException("Not implemented for > 4 arguments"); |
9533 } | 9532 } |
9534 } | 9533 } |
9535 } | 9534 } |
OLD | NEW |