chromium/v8/src/parsing/scanner.cc

// Copyright 2011 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Features shared by parsing and pre-parsing scanners.

#include "src/parsing/scanner.h"

#include <stdint.h>

#include <cmath>
#include <optional>

#include "src/ast/ast-value-factory.h"
#include "src/base/strings.h"
#include "src/numbers/conversions-inl.h"
#include "src/numbers/conversions.h"
#include "src/objects/bigint.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/scanner-inl.h"
#include "src/zone/zone.h"

namespace v8::internal {

class Scanner::ErrorState {};

// ----------------------------------------------------------------------------
// Scanner::BookmarkScope

const size_t Scanner::BookmarkScope::kNoBookmark =;
const size_t Scanner::BookmarkScope::kBookmarkWasApplied =;

void Scanner::BookmarkScope::Set(size_t position) {}

void Scanner::BookmarkScope::Apply() {}

bool Scanner::BookmarkScope::HasBeenSet() const {}

bool Scanner::BookmarkScope::HasBeenApplied() const {}

// ----------------------------------------------------------------------------
// Scanner

Scanner::Scanner(Utf16CharacterStream* source, UnoptimizedCompileFlags flags)
    :{}

void Scanner::Initialize() {}

// static
bool Scanner::IsInvalid(base::uc32 c) {}

template <bool capture_raw, bool unicode>
base::uc32 Scanner::ScanHexNumber(int expected_length) {}

template <bool capture_raw>
base::uc32 Scanner::ScanUnlimitedLengthHexNumber(base::uc32 max_value,
                                                 int beg_pos) {}

Token::Value Scanner::Next() {}

Token::Value Scanner::PeekAhead() {}

Token::Value Scanner::PeekAheadAhead() {}

Token::Value Scanner::SkipSingleHTMLComment() {}

Token::Value Scanner::SkipSingleLineComment() {}

Token::Value Scanner::SkipMagicComment(base::uc32 hash_or_at_sign) {}

void Scanner::TryToParseMagicComment(base::uc32 hash_or_at_sign) {}

Token::Value Scanner::SkipMultiLineComment() {}

Token::Value Scanner::ScanHtmlComment() {}

#ifdef DEBUG
void Scanner::SanityCheckTokenDesc(const TokenDesc& token) const {}
#endif  // DEBUG

void Scanner::SeekForward(int pos) {}

template <bool capture_raw>
bool Scanner::ScanEscape() {}

template <bool capture_raw>
base::uc32 Scanner::ScanOctalEscape(base::uc32 c, int length) {}

Token::Value Scanner::ScanString() {}

Token::Value Scanner::ScanPrivateName() {}

Token::Value Scanner::ScanTemplateSpan() {}

template <typename IsolateT>
Handle<String> Scanner::SourceUrl(IsolateT* isolate) const {}

template Handle<String> Scanner::SourceUrl(Isolate* isolate) const;
template Handle<String> Scanner::SourceUrl(LocalIsolate* isolate) const;

template <typename IsolateT>
Handle<String> Scanner::SourceMappingUrl(IsolateT* isolate) const {}

template Handle<String> Scanner::SourceMappingUrl(Isolate* isolate) const;
template Handle<String> Scanner::SourceMappingUrl(LocalIsolate* isolate) const;

bool Scanner::ScanDigitsWithNumericSeparators(bool (*predicate)(base::uc32 ch),
                                              bool is_check_first_digit) {}

bool Scanner::ScanDecimalDigits(bool allow_numeric_separator) {}

bool Scanner::ScanDecimalAsSmiWithNumericSeparators(uint64_t* value) {}

bool Scanner::ScanDecimalAsSmi(uint64_t* value, bool allow_numeric_separator) {}

bool Scanner::ScanBinaryDigits() {}

bool Scanner::ScanOctalDigits() {}

bool Scanner::ScanImplicitOctalDigits(int start_pos,
                                      Scanner::NumberKind* kind) {}

bool Scanner::ScanHexDigits() {}

bool Scanner::ScanSignedInteger() {}

Token::Value Scanner::ScanNumber(bool seen_period) {}

base::uc32 Scanner::ScanIdentifierUnicodeEscape() {}

template <bool capture_raw>
base::uc32 Scanner::ScanUnicodeEscape() {}

Token::Value Scanner::ScanIdentifierOrKeywordInnerSlow(bool escaped,
                                                       bool can_be_keyword) {}

bool Scanner::ScanRegExpPattern() {}

std::optional<RegExpFlags> Scanner::ScanRegExpFlags() {}

const AstRawString* Scanner::CurrentSymbol(
    AstValueFactory* ast_value_factory) const {}

const AstRawString* Scanner::NextSymbol(
    AstValueFactory* ast_value_factory) const {}

const AstRawString* Scanner::CurrentRawSymbol(
    AstValueFactory* ast_value_factory) const {}


double Scanner::DoubleValue() {}

const char* Scanner::CurrentLiteralAsCString(Zone* zone) const {}

void Scanner::SeekNext(size_t position) {}

}  // namespace v8::internal