| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 backing_store_.Dispose(); | 239 backing_store_.Dispose(); |
| 240 backing_store_ = new_store; | 240 backing_store_ = new_store; |
| 241 } | 241 } |
| 242 position_ = new_content_size; | 242 position_ = new_content_size; |
| 243 is_ascii_ = false; | 243 is_ascii_ = false; |
| 244 } | 244 } |
| 245 | 245 |
| 246 bool is_ascii_; | 246 bool is_ascii_; |
| 247 int position_; | 247 int position_; |
| 248 Vector<byte> backing_store_; | 248 Vector<byte> backing_store_; |
| 249 |
| 250 DISALLOW_COPY_AND_ASSIGN(LiteralBuffer); |
| 249 }; | 251 }; |
| 250 | 252 |
| 251 | 253 |
| 252 // ---------------------------------------------------------------------------- | 254 // ---------------------------------------------------------------------------- |
| 253 // Scanner base-class. | 255 // Scanner base-class. |
| 254 | 256 |
| 255 // Generic functionality used by both JSON and JavaScript scanners. | 257 // Generic functionality used by both JSON and JavaScript scanners. |
| 256 class Scanner { | 258 class Scanner { |
| 257 public: | 259 public: |
| 258 // -1 is outside of the range of any real source code. | 260 // -1 is outside of the range of any real source code. |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 // keyword with the current prefix). | 656 // keyword with the current prefix). |
| 655 const char* keyword_; | 657 const char* keyword_; |
| 656 int counter_; | 658 int counter_; |
| 657 Token::Value keyword_token_; | 659 Token::Value keyword_token_; |
| 658 }; | 660 }; |
| 659 | 661 |
| 660 | 662 |
| 661 } } // namespace v8::internal | 663 } } // namespace v8::internal |
| 662 | 664 |
| 663 #endif // V8_SCANNER_BASE_H_ | 665 #endif // V8_SCANNER_BASE_H_ |
| OLD | NEW |