| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 Token::Value token_; | 255 Token::Value token_; |
| 256 | 256 |
| 257 // Matching a specific keyword string (there is only one possible valid | 257 // Matching a specific keyword string (there is only one possible valid |
| 258 // keyword with the current prefix). | 258 // keyword with the current prefix). |
| 259 const char* keyword_; | 259 const char* keyword_; |
| 260 int counter_; | 260 int counter_; |
| 261 Token::Value keyword_token_; | 261 Token::Value keyword_token_; |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 | 264 |
| 265 enum ParserMode { PARSE, PREPARSE }; | |
| 266 enum ParserLanguage { JAVASCRIPT, JSON }; | 265 enum ParserLanguage { JAVASCRIPT, JSON }; |
| 267 | 266 |
| 268 | 267 |
| 269 class Scanner { | 268 class Scanner { |
| 270 public: | 269 public: |
| 271 typedef unibrow::Utf8InputBuffer<1024> Utf8Decoder; | 270 typedef unibrow::Utf8InputBuffer<1024> Utf8Decoder; |
| 272 | 271 |
| 273 class LiteralScope { | 272 class LiteralScope { |
| 274 public: | 273 public: |
| 275 explicit LiteralScope(Scanner* self); | 274 explicit LiteralScope(Scanner* self); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 bool stack_overflow_; | 512 bool stack_overflow_; |
| 514 static StaticResource<Utf8Decoder> utf8_decoder_; | 513 static StaticResource<Utf8Decoder> utf8_decoder_; |
| 515 | 514 |
| 516 // One Unicode character look-ahead; c0_ < 0 at the end of the input. | 515 // One Unicode character look-ahead; c0_ < 0 at the end of the input. |
| 517 uc32 c0_; | 516 uc32 c0_; |
| 518 }; | 517 }; |
| 519 | 518 |
| 520 } } // namespace v8::internal | 519 } } // namespace v8::internal |
| 521 | 520 |
| 522 #endif // V8_SCANNER_H_ | 521 #endif // V8_SCANNER_H_ |
| OLD | NEW |