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

Side by Side Diff: frog/minfrog

Issue 9111019: Support for nested comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months 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 | « no previous file | frog/tokenizer.dart » ('j') | frog/tokenizer.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 // ********** Library dart:core ************** 2 // ********** Library dart:core **************
3 // ********** Natives dart:core ************** 3 // ********** Natives dart:core **************
4 function $throw(e) { 4 function $throw(e) {
5 // If e is not a value, we can use V8's captureStackTrace utility method. 5 // If e is not a value, we can use V8's captureStackTrace utility method.
6 // TODO(jmesserly): capture the stack trace on other JS engines. 6 // TODO(jmesserly): capture the stack trace on other JS engines.
7 if (e && (typeof e == 'object') && Error.captureStackTrace) { 7 if (e && (typeof e == 'object') && Error.captureStackTrace) {
8 // TODO(jmesserly): this will clobber the e.stack property 8 // TODO(jmesserly): this will clobber the e.stack property
9 Error.captureStackTrace(e, $throw); 9 Error.captureStackTrace(e, $throw);
10 } 10 }
(...skipping 6947 matching lines...) Expand 10 before | Expand all | Expand 10 after
6958 if (this._skipWhitespace) { 6958 if (this._skipWhitespace) {
6959 return this.next(); 6959 return this.next();
6960 } 6960 }
6961 else { 6961 else {
6962 return this._finishToken(64/*TokenKind.COMMENT*/); 6962 return this._finishToken(64/*TokenKind.COMMENT*/);
6963 } 6963 }
6964 } 6964 }
6965 } 6965 }
6966 } 6966 }
6967 TokenizerBase.prototype.finishMultiLineComment = function() { 6967 TokenizerBase.prototype.finishMultiLineComment = function() {
6968 while (true) { 6968 var nesting = 1;
6969 do {
6969 var ch = this._nextChar(); 6970 var ch = this._nextChar();
6970 if (ch == 0) { 6971 if (ch == 0) {
6971 return this._finishToken(67/*TokenKind.INCOMPLETE_COMMENT*/); 6972 return this._finishToken(67/*TokenKind.INCOMPLETE_COMMENT*/);
6972 } 6973 }
6973 else if (ch == 42) { 6974 else if (ch == 42) {
6974 if (this._maybeEatChar(47)) { 6975 if (this._maybeEatChar(47)) {
6975 if (this._skipWhitespace) { 6976 nesting--;
6976 return this.next(); 6977 }
6977 } 6978 }
6978 else { 6979 else if (ch == 47) {
6979 return this._finishToken(64/*TokenKind.COMMENT*/); 6980 if (this._maybeEatChar(42)) {
6980 } 6981 nesting++;
6981 } 6982 }
6982 } 6983 }
6983 } 6984 }
6984 return this._errorToken(); 6985 while (nesting > 0)
6986 if (this._skipWhitespace) {
6987 return this.next();
6988 }
6989 else {
6990 return this._finishToken(64/*TokenKind.COMMENT*/);
6991 }
6985 } 6992 }
6986 TokenizerBase.prototype.eatDigits = function() { 6993 TokenizerBase.prototype.eatDigits = function() {
6987 while (this._lang_index < this._text.length) { 6994 while (this._lang_index < this._text.length) {
6988 if (TokenizerHelpers.isDigit(this._text.charCodeAt(this._lang_index))) { 6995 if (TokenizerHelpers.isDigit(this._text.charCodeAt(this._lang_index))) {
6989 this._lang_index++; 6996 this._lang_index++;
6990 } 6997 }
6991 else { 6998 else {
6992 return; 6999 return;
6993 } 7000 }
6994 } 7001 }
(...skipping 6794 matching lines...) Expand 10 before | Expand all | Expand 10 after
13789 $globals._RED_COLOR = '\u001b[31m'; 13796 $globals._RED_COLOR = '\u001b[31m';
13790 } 13797 }
13791 var const$1 = new EmptyQueueException()/*const EmptyQueueException()*/; 13798 var const$1 = new EmptyQueueException()/*const EmptyQueueException()*/;
13792 var const$126 = new IllegalAccessException()/*const IllegalAccessException()*/; 13799 var const$126 = new IllegalAccessException()/*const IllegalAccessException()*/;
13793 var const$127 = ImmutableList.ImmutableList$from$factory([])/*const []*/; 13800 var const$127 = ImmutableList.ImmutableList$from$factory([])/*const []*/;
13794 var const$2 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; 13801 var const$2 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/;
13795 var const$7 = new NoMoreElementsException()/*const NoMoreElementsException()*/; 13802 var const$7 = new NoMoreElementsException()/*const NoMoreElementsException()*/;
13796 var $globals = {}; 13803 var $globals = {};
13797 $static_init(); 13804 $static_init();
13798 main(); 13805 main();
OLDNEW
« no previous file with comments | « no previous file | frog/tokenizer.dart » ('j') | frog/tokenizer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698