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

Unified Diff: runtime/vm/parser.cc

Issue 1564493002: Make Scanner::kNoSourcePos be a true sentinel value (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index a0a0aecc68d15cfec0205f58a8ce901fdbfbeee9..ac3cbb52ea1c812ef7e2047788ca362a7bb4539a 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -236,7 +236,7 @@ void ParsedFunction::AllocateVariables() {
struct CatchParamDesc {
CatchParamDesc()
- : token_pos(0), type(NULL), name(NULL), var(NULL) { }
+ : token_pos(Scanner::kNoSourcePos), type(NULL), name(NULL), var(NULL) { }
intptr_t token_pos;
const AbstractType* type;
const String* name;
@@ -390,7 +390,7 @@ Parser::~Parser() {
const GrowableObjectArray& pending_functions =
GrowableObjectArray::Handle(T->pending_functions());
ASSERT(pending_functions.Length() > 0);
- ASSERT(pending_functions.At(pending_functions.Length()-1) ==
+ ASSERT(pending_functions.At(pending_functions.Length() - 1) ==
current_function().raw());
pending_functions.RemoveLast();
}
@@ -515,7 +515,7 @@ RawInteger* Parser::CurrentIntegerLiteral() const {
struct ParamDesc {
ParamDesc()
: type(NULL),
- name_pos(0),
+ name_pos(Scanner::kNoSourcePos),
name(NULL),
default_value(NULL),
metadata(NULL),
@@ -620,7 +620,7 @@ struct MemberDesc {
has_factory = false;
has_operator = false;
has_native = false;
- metadata_pos = -1;
+ metadata_pos = Scanner::kNoSourcePos;
operator_token = Token::kILLEGAL;
type = NULL;
name_pos = 0;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698