Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: pkg/analyzer/lib/src/generated/scanner.dart

Issue 706283002: Fix remaining error code classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/enum_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.scanner; 8 library engine.scanner;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 if (next == 0x2F) { 1863 if (next == 0x2F) {
1864 return _select(0x3D, TokenType.TILDE_SLASH_EQ, TokenType.TILDE_SLASH); 1864 return _select(0x3D, TokenType.TILDE_SLASH_EQ, TokenType.TILDE_SLASH);
1865 } else { 1865 } else {
1866 _appendTokenOfType(TokenType.TILDE); 1866 _appendTokenOfType(TokenType.TILDE);
1867 return next; 1867 return next;
1868 } 1868 }
1869 } 1869 }
1870 } 1870 }
1871 1871
1872 /** 1872 /**
1873 * The enumeration `ScannerErrorCode` defines the error codes used for errors de tected by the 1873 * The enumeration `ScannerErrorCode` defines the error codes used for errors
1874 * scanner. 1874 * detected by the scanner.
1875 */ 1875 */
1876 class ScannerErrorCode extends Enum<ScannerErrorCode> implements ErrorCode { 1876 class ScannerErrorCode extends ErrorCode {
1877 static const ScannerErrorCode ILLEGAL_CHARACTER = const ScannerErrorCode.con1( 'ILLEGAL_CHARACTER', 0, "Illegal character {0}"); 1877 static const ScannerErrorCode ILLEGAL_CHARACTER
1878 = const ScannerErrorCode('ILLEGAL_CHARACTER', "Illegal character {0}");
1878 1879
1879 static const ScannerErrorCode MISSING_DIGIT = const ScannerErrorCode.con1('MIS SING_DIGIT', 1, "Decimal digit expected"); 1880 static const ScannerErrorCode MISSING_DIGIT
1881 = const ScannerErrorCode('MISSING_DIGIT', "Decimal digit expected");
1880 1882
1881 static const ScannerErrorCode MISSING_HEX_DIGIT = const ScannerErrorCode.con1( 'MISSING_HEX_DIGIT', 2, "Hexidecimal digit expected"); 1883 static const ScannerErrorCode MISSING_HEX_DIGIT
1884 = const ScannerErrorCode(
1885 'MISSING_HEX_DIGIT',
1886 "Hexidecimal digit expected");
1882 1887
1883 static const ScannerErrorCode MISSING_QUOTE = const ScannerErrorCode.con1('MIS SING_QUOTE', 3, "Expected quote (' or \")"); 1888 static const ScannerErrorCode MISSING_QUOTE
1889 = const ScannerErrorCode('MISSING_QUOTE', "Expected quote (' or \")");
1884 1890
1885 static const ScannerErrorCode UNTERMINATED_MULTI_LINE_COMMENT = const ScannerE rrorCode.con1('UNTERMINATED_MULTI_LINE_COMMENT', 4, "Unterminated multi-line com ment"); 1891 static const ScannerErrorCode UNTERMINATED_MULTI_LINE_COMMENT
1892 = const ScannerErrorCode(
1893 'UNTERMINATED_MULTI_LINE_COMMENT',
1894 "Unterminated multi-line comment");
1886 1895
1887 static const ScannerErrorCode UNTERMINATED_STRING_LITERAL = const ScannerError Code.con1('UNTERMINATED_STRING_LITERAL', 5, "Unterminated string literal"); 1896 static const ScannerErrorCode UNTERMINATED_STRING_LITERAL
1888 1897 = const ScannerErrorCode(
1889 static const List<ScannerErrorCode> values = const [ 1898 'UNTERMINATED_STRING_LITERAL',
1890 ILLEGAL_CHARACTER, 1899 "Unterminated string literal");
1891 MISSING_DIGIT,
1892 MISSING_HEX_DIGIT,
1893 MISSING_QUOTE,
1894 UNTERMINATED_MULTI_LINE_COMMENT,
1895 UNTERMINATED_STRING_LITERAL];
1896 1900
1897 /** 1901 /**
1898 * The template used to create the message to be displayed for this error. 1902 * Initialize a newly created error code to have the given [name]. The message
1903 * associated with the error will be created from the given [message]
1904 * template. The correction associated with the error will be created from the
1905 * given [correction] template.
1899 */ 1906 */
1900 final String message; 1907 const ScannerErrorCode(String name, String message, [String correction])
1901 1908 : super(name, message, correction);
1902 /**
1903 * The template used to create the correction to be displayed for this error, or `null` if
1904 * there is no correction information for this error.
1905 */
1906 final String correction;
1907
1908 /**
1909 * Initialize a newly created error code to have the given message.
1910 *
1911 * @param message the message template used to create the message to be displa yed for this error
1912 */
1913 const ScannerErrorCode.con1(String name, int ordinal, String message) : this.c on2(name, ordinal, message, null);
1914
1915 /**
1916 * Initialize a newly created error code to have the given message and correct ion.
1917 *
1918 * @param message the template used to create the message to be displayed for the error
1919 * @param correction the template used to create the correction to be displaye d for the error
1920 */
1921 const ScannerErrorCode.con2(String name, int ordinal, this.message, this.corre ction) : super(name, ordinal);
1922 1909
1923 @override 1910 @override
1924 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 1911 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
1925 1912
1926 @override 1913 @override
1927 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 1914 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
1928
1929 @override
1930 String get uniqueName => "$runtimeType.$name";
1931 } 1915 }
1932 1916
1933 /** 1917 /**
1934 * Instances of the class `StringToken` represent a token whose value is indepen dent of it's 1918 * Instances of the class `StringToken` represent a token whose value is indepen dent of it's
1935 * type. 1919 * type.
1936 */ 1920 */
1937 class StringToken extends Token { 1921 class StringToken extends Token {
1938 /** 1922 /**
1939 * The lexeme represented by this token. 1923 * The lexeme represented by this token.
1940 */ 1924 */
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
2699 * @param precedingComment the first comment in the list of comments that prec ede this token 2683 * @param precedingComment the first comment in the list of comments that prec ede this token
2700 */ 2684 */
2701 TokenWithComment(TokenType type, int offset, this._precedingComment) : super(t ype, offset); 2685 TokenWithComment(TokenType type, int offset, this._precedingComment) : super(t ype, offset);
2702 2686
2703 @override 2687 @override
2704 Token copy() => new TokenWithComment(type, offset, _precedingComment); 2688 Token copy() => new TokenWithComment(type, offset, _precedingComment);
2705 2689
2706 @override 2690 @override
2707 Token get precedingComments => _precedingComment; 2691 Token get precedingComments => _precedingComment;
2708 } 2692 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/enum_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698