OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT. | 5 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT. |
6 // | 6 // |
7 // Instead modify 'pkg/front_end/messages.yaml' and run | 7 // Instead modify 'pkg/front_end/messages.yaml' and run |
8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update. | 8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update. |
9 | 9 |
10 part of fasta.codes; | 10 part of fasta.codes; |
(...skipping 11 matching lines...) Expand all Loading... |
22 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 22 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
23 FastaMessage _formatExpectedClassBodyToSkip( | 23 FastaMessage _formatExpectedClassBodyToSkip( |
24 Uri uri, int charOffset, Token token) { | 24 Uri uri, int charOffset, Token token) { |
25 String lexeme = token.lexeme; | 25 String lexeme = token.lexeme; |
26 return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip, | 26 return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip, |
27 message: "Expected a class body, but got '$lexeme'.", | 27 message: "Expected a class body, but got '$lexeme'.", |
28 arguments: {'token': token}); | 28 arguments: {'token': token}); |
29 } | 29 } |
30 | 30 |
31 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 31 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 32 const FastaCode<_FunctionTypeDefaultValue> codeFunctionTypeDefaultValue = |
| 33 const FastaCode<_FunctionTypeDefaultValue>("FunctionTypeDefaultValue", |
| 34 template: r"Can't have a default value in a function type.", |
| 35 dart2jsCode: "FASTA_IGNORED", |
| 36 format: _formatFunctionTypeDefaultValue); |
| 37 |
| 38 typedef FastaMessage _FunctionTypeDefaultValue(Uri uri, int charOffset); |
| 39 |
| 40 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 41 FastaMessage _formatFunctionTypeDefaultValue(Uri uri, int charOffset) { |
| 42 return new FastaMessage(uri, charOffset, codeFunctionTypeDefaultValue, |
| 43 message: "Can't have a default value in a function type.", arguments: {}); |
| 44 } |
| 45 |
| 46 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
32 const FastaCode<_StackOverflow> codeStackOverflow = | 47 const FastaCode<_StackOverflow> codeStackOverflow = |
33 const FastaCode<_StackOverflow>("StackOverflow", | 48 const FastaCode<_StackOverflow>("StackOverflow", |
34 template: r"Stack overflow.", | 49 template: r"Stack overflow.", |
35 dart2jsCode: "GENERIC", | 50 dart2jsCode: "GENERIC", |
36 format: _formatStackOverflow); | 51 format: _formatStackOverflow); |
37 | 52 |
38 typedef FastaMessage _StackOverflow(Uri uri, int charOffset); | 53 typedef FastaMessage _StackOverflow(Uri uri, int charOffset); |
39 | 54 |
40 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 55 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
41 FastaMessage _formatStackOverflow(Uri uri, int charOffset) { | 56 FastaMessage _formatStackOverflow(Uri uri, int charOffset) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 typedef FastaMessage _FactoryNotSync(Uri uri, int charOffset); | 117 typedef FastaMessage _FactoryNotSync(Uri uri, int charOffset); |
103 | 118 |
104 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 119 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
105 FastaMessage _formatFactoryNotSync(Uri uri, int charOffset) { | 120 FastaMessage _formatFactoryNotSync(Uri uri, int charOffset) { |
106 return new FastaMessage(uri, charOffset, codeFactoryNotSync, | 121 return new FastaMessage(uri, charOffset, codeFactoryNotSync, |
107 message: "Factories can't use 'async', 'async*', or 'sync*'.", | 122 message: "Factories can't use 'async', 'async*', or 'sync*'.", |
108 arguments: {}); | 123 arguments: {}); |
109 } | 124 } |
110 | 125 |
111 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 126 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 127 const FastaCode<_PrivateNamedParameter> codePrivateNamedParameter = |
| 128 const FastaCode<_PrivateNamedParameter>("PrivateNamedParameter", |
| 129 template: r"An optional named parameter can't start with '_'.", |
| 130 dart2jsCode: "FASTA_IGNORED", |
| 131 format: _formatPrivateNamedParameter); |
| 132 |
| 133 typedef FastaMessage _PrivateNamedParameter(Uri uri, int charOffset); |
| 134 |
| 135 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 136 FastaMessage _formatPrivateNamedParameter(Uri uri, int charOffset) { |
| 137 return new FastaMessage(uri, charOffset, codePrivateNamedParameter, |
| 138 message: "An optional named parameter can't start with '_'.", |
| 139 arguments: {}); |
| 140 } |
| 141 |
| 142 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
112 const FastaCode<_YieldNotGenerator> codeYieldNotGenerator = | 143 const FastaCode<_YieldNotGenerator> codeYieldNotGenerator = |
113 const FastaCode<_YieldNotGenerator>("YieldNotGenerator", | 144 const FastaCode<_YieldNotGenerator>("YieldNotGenerator", |
114 template: r"'yield' can only be used in 'sync*' or 'async*' methods.", | 145 template: r"'yield' can only be used in 'sync*' or 'async*' methods.", |
115 dart2jsCode: "FASTA_IGNORED", | 146 dart2jsCode: "FASTA_IGNORED", |
116 format: _formatYieldNotGenerator); | 147 format: _formatYieldNotGenerator); |
117 | 148 |
118 typedef FastaMessage _YieldNotGenerator(Uri uri, int charOffset); | 149 typedef FastaMessage _YieldNotGenerator(Uri uri, int charOffset); |
119 | 150 |
120 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 151 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
121 FastaMessage _formatYieldNotGenerator(Uri uri, int charOffset) { | 152 FastaMessage _formatYieldNotGenerator(Uri uri, int charOffset) { |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 592 |
562 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 593 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
563 FastaMessage _formatInvalidSyncModifier(Uri uri, int charOffset) { | 594 FastaMessage _formatInvalidSyncModifier(Uri uri, int charOffset) { |
564 return new FastaMessage(uri, charOffset, codeInvalidSyncModifier, | 595 return new FastaMessage(uri, charOffset, codeInvalidSyncModifier, |
565 message: "Invalid modifier 'sync'.", | 596 message: "Invalid modifier 'sync'.", |
566 tip: "Try replacing 'sync' with 'sync*'.", | 597 tip: "Try replacing 'sync' with 'sync*'.", |
567 arguments: {}); | 598 arguments: {}); |
568 } | 599 } |
569 | 600 |
570 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 601 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 602 const FastaCode<_GetterWithFormals> codeGetterWithFormals = |
| 603 const FastaCode<_GetterWithFormals>("GetterWithFormals", |
| 604 template: r"A getter can't have formal parameters.", |
| 605 tip: r"Try removing '(...)'.", |
| 606 dart2jsCode: "FASTA_IGNORED", |
| 607 format: _formatGetterWithFormals); |
| 608 |
| 609 typedef FastaMessage _GetterWithFormals(Uri uri, int charOffset); |
| 610 |
| 611 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 612 FastaMessage _formatGetterWithFormals(Uri uri, int charOffset) { |
| 613 return new FastaMessage(uri, charOffset, codeGetterWithFormals, |
| 614 message: "A getter can't have formal parameters.", |
| 615 tip: "Try removing '(...)'.", |
| 616 arguments: {}); |
| 617 } |
| 618 |
| 619 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 620 const FastaCode<_NoFormals> codeNoFormals = const FastaCode<_NoFormals>( |
| 621 "NoFormals", |
| 622 template: r"A function should have formal parameters.", |
| 623 tip: |
| 624 r"Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to decl
are a getter.", |
| 625 dart2jsCode: "FASTA_IGNORED", |
| 626 format: _formatNoFormals); |
| 627 |
| 628 typedef FastaMessage _NoFormals(Uri uri, int charOffset, Token token); |
| 629 |
| 630 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 631 FastaMessage _formatNoFormals(Uri uri, int charOffset, Token token) { |
| 632 String lexeme = token.lexeme; |
| 633 return new FastaMessage(uri, charOffset, codeNoFormals, |
| 634 message: "A function should have formal parameters.", |
| 635 tip: |
| 636 "Try adding '()' after '$lexeme', or add 'get' before '$lexeme' to dec
lare a getter.", |
| 637 arguments: {'token': token}); |
| 638 } |
| 639 |
| 640 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
571 const FastaCode<_ExpectedOpenParens> codeExpectedOpenParens = | 641 const FastaCode<_ExpectedOpenParens> codeExpectedOpenParens = |
572 const FastaCode<_ExpectedOpenParens>("ExpectedOpenParens", | 642 const FastaCode<_ExpectedOpenParens>("ExpectedOpenParens", |
573 template: r"Expected '('.", | 643 template: r"Expected '('.", |
574 dart2jsCode: "GENERIC", | 644 dart2jsCode: "GENERIC", |
575 format: _formatExpectedOpenParens); | 645 format: _formatExpectedOpenParens); |
576 | 646 |
577 typedef FastaMessage _ExpectedOpenParens(Uri uri, int charOffset); | 647 typedef FastaMessage _ExpectedOpenParens(Uri uri, int charOffset); |
578 | 648 |
579 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 649 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
580 FastaMessage _formatExpectedOpenParens(Uri uri, int charOffset) { | 650 FastaMessage _formatExpectedOpenParens(Uri uri, int charOffset) { |
(...skipping 11 matching lines...) Expand all Loading... |
592 | 662 |
593 typedef FastaMessage _UnterminatedComment(Uri uri, int charOffset); | 663 typedef FastaMessage _UnterminatedComment(Uri uri, int charOffset); |
594 | 664 |
595 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 665 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
596 FastaMessage _formatUnterminatedComment(Uri uri, int charOffset) { | 666 FastaMessage _formatUnterminatedComment(Uri uri, int charOffset) { |
597 return new FastaMessage(uri, charOffset, codeUnterminatedComment, | 667 return new FastaMessage(uri, charOffset, codeUnterminatedComment, |
598 message: "Comment starting with '/*' must end with '*/'.", arguments: {}); | 668 message: "Comment starting with '/*' must end with '*/'.", arguments: {}); |
599 } | 669 } |
600 | 670 |
601 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 671 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 672 const FastaCode<_CatchSyntax> codeCatchSyntax = const FastaCode<_CatchSyntax>( |
| 673 "CatchSyntax", |
| 674 template: |
| 675 r"'catch' must be followed by '(identifier)' or '(identifier, identifier
)'.", |
| 676 tip: |
| 677 r"No types are needed, the first is given by 'on', the second is always
'StackTrace'.", |
| 678 format: _formatCatchSyntax); |
| 679 |
| 680 typedef FastaMessage _CatchSyntax(Uri uri, int charOffset); |
| 681 |
| 682 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 683 FastaMessage _formatCatchSyntax(Uri uri, int charOffset) { |
| 684 return new FastaMessage(uri, charOffset, codeCatchSyntax, |
| 685 message: |
| 686 "'catch' must be followed by '(identifier)' or '(identifier, identifie
r)'.", |
| 687 tip: |
| 688 "No types are needed, the first is given by 'on', the second is always
'StackTrace'.", |
| 689 arguments: {}); |
| 690 } |
| 691 |
| 692 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
602 const FastaCode<_ExpectedClassBody> codeExpectedClassBody = | 693 const FastaCode<_ExpectedClassBody> codeExpectedClassBody = |
603 const FastaCode<_ExpectedClassBody>("ExpectedClassBody", | 694 const FastaCode<_ExpectedClassBody>("ExpectedClassBody", |
604 template: r"Expected a class body, but got '#lexeme'.", | 695 template: r"Expected a class body, but got '#lexeme'.", |
605 dart2jsCode: "FASTA_FATAL", | 696 dart2jsCode: "FASTA_FATAL", |
606 format: _formatExpectedClassBody); | 697 format: _formatExpectedClassBody); |
607 | 698 |
608 typedef FastaMessage _ExpectedClassBody(Uri uri, int charOffset, Token token); | 699 typedef FastaMessage _ExpectedClassBody(Uri uri, int charOffset, Token token); |
609 | 700 |
610 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 701 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
611 FastaMessage _formatExpectedClassBody(Uri uri, int charOffset, Token token) { | 702 FastaMessage _formatExpectedClassBody(Uri uri, int charOffset, Token token) { |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 1045 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
955 FastaMessage _formatNonAsciiIdentifier( | 1046 FastaMessage _formatNonAsciiIdentifier( |
956 Uri uri, int charOffset, String character, int codePoint) { | 1047 Uri uri, int charOffset, String character, int codePoint) { |
957 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; | 1048 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; |
958 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier, | 1049 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier, |
959 message: | 1050 message: |
960 "The non-ASCII character '$character' ($unicode) can't be used in iden
tifiers, only in strings and comments.", | 1051 "The non-ASCII character '$character' ($unicode) can't be used in iden
tifiers, only in strings and comments.", |
961 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$'
(a dollar sign).", | 1052 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$'
(a dollar sign).", |
962 arguments: {'character': character, 'codePoint': codePoint}); | 1053 arguments: {'character': character, 'codePoint': codePoint}); |
963 } | 1054 } |
OLD | NEW |