16 const intptr_t raw_line_starts_data[] = {
17 0, 8, 12, 17, 18, 20, 23, 30, 31, 33,
19 const intptr_t
length = std::extent<
decltype(raw_line_starts_data)>
::value;
24 line_starts_data.SetUint16(
i << 1,
25 static_cast<int16_t
>(raw_line_starts_data[
i]));
27 return line_starts_data;
37 intptr_t expected_line,
38 intptr_t expected_col) {
42 EXPECT_EQ(expected_line,
line);
43 EXPECT_EQ(expected_col, col);
68 intptr_t expected_first_token,
69 intptr_t expected_last_token) {
73 EXPECT_EQ(expected_first_token, first_token.
Serialize());
74 EXPECT_EQ(expected_last_token, last_token.
Serialize());
static TokenPosition Synthetic(intptr_t value)
int32_t Serialize() const
static TypedDataPtr New(intptr_t class_id, intptr_t len, Heap::Space space=Heap::kNew)
DART_WARN_UNUSED_RESULT bool LocationForPosition(intptr_t position, intptr_t *line, intptr_t *col=nullptr) const
uint32_t MaxPosition() const
DART_WARN_UNUSED_RESULT bool TokenRangeAtLine(intptr_t line_number, dart::TokenPosition *first_token_index, dart::TokenPosition *last_token_index) const
void ExpectTokenRangeAtLine(const kernel::KernelLineStartsReader &reader, intptr_t line, intptr_t expected_first_token, intptr_t expected_last_token)
const dart::TypedData & CreateLineStartsData()
ISOLATE_UNIT_TEST_CASE(StackAllocatedDestruction)
void ExpectLocationForPosition(const kernel::KernelLineStartsReader &reader, intptr_t position, intptr_t expected_line, intptr_t expected_col)