| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return 0; | 119 return 0; |
| 120 } | 120 } |
| 121 virtual bool ReadBlock() { | 121 virtual bool ReadBlock() { |
| 122 // Entire string is read at start. | 122 // Entire string is read at start. |
| 123 return false; | 123 return false; |
| 124 } | 124 } |
| 125 Handle<ExternalTwoByteString> source_; | 125 Handle<ExternalTwoByteString> source_; |
| 126 const uc16* raw_data_; // Pointer to the actual array of characters. | 126 const uc16* raw_data_; // Pointer to the actual array of characters. |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 | |
| 130 // ---------------------------------------------------------------------------- | |
| 131 // V8JavaScriptScanner | |
| 132 // JavaScript scanner getting its input from either a V8 String or a unicode | |
| 133 // CharacterStream. | |
| 134 | |
| 135 class V8JavaScriptScanner : public JavaScriptScanner { | |
| 136 public: | |
| 137 explicit V8JavaScriptScanner(UnicodeCache* unicode_cache) | |
| 138 : JavaScriptScanner(unicode_cache) {} | |
| 139 | |
| 140 void Initialize(UC16CharacterStream* source); | |
| 141 }; | |
| 142 | |
| 143 | |
| 144 } } // namespace v8::internal | 129 } } // namespace v8::internal |
| 145 | 130 |
| 146 #endif // V8_SCANNER_H_ | 131 #endif // V8_SCANNER_H_ |
| OLD | NEW |