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

Side by Side Diff: runtime/vm/parser.h

Issue 2005723004: Fraction class prototype and test (not to be committed). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: work in progress Created 4 years, 5 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
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/parser.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef VM_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 void ComputeCurrentToken(); 370 void ComputeCurrentToken();
371 371
372 RawLibraryPrefix* ParsePrefix(); 372 RawLibraryPrefix* ParsePrefix();
373 373
374 Token::Kind LookaheadToken(int num_tokens); 374 Token::Kind LookaheadToken(int num_tokens);
375 String* CurrentLiteral() const; 375 String* CurrentLiteral() const;
376 RawDouble* CurrentDoubleLiteral() const; 376 RawDouble* CurrentDoubleLiteral() const;
377 RawInteger* CurrentIntegerLiteral() const; 377 RawInteger* CurrentIntegerLiteral() const;
378 RawFraction* CurrentRationalLiteral() const;
378 379
379 // Sets parser to given token position in the stream. 380 // Sets parser to given token position in the stream.
380 void SetPosition(TokenPosition position); 381 void SetPosition(TokenPosition position);
381 382
382 void ConsumeToken() { 383 void ConsumeToken() {
383 // Reset cache and advance the token. 384 // Reset cache and advance the token.
384 prev_token_pos_ = tokens_iterator_.CurrentPosition(); 385 prev_token_pos_ = tokens_iterator_.CurrentPosition();
385 token_kind_ = Token::kILLEGAL; 386 token_kind_ = Token::kILLEGAL;
386 tokens_iterator_.Advance(); 387 tokens_iterator_.Advance();
387 INC_STAT(thread(), num_tokens_consumed, 1); 388 INC_STAT(thread(), num_tokens_consumed, 1);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 967
967 intptr_t recursion_counter_; 968 intptr_t recursion_counter_;
968 friend class RecursionChecker; 969 friend class RecursionChecker;
969 970
970 DISALLOW_COPY_AND_ASSIGN(Parser); 971 DISALLOW_COPY_AND_ASSIGN(Parser);
971 }; 972 };
972 973
973 } // namespace dart 974 } // namespace dart
974 975
975 #endif // VM_PARSER_H_ 976 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698