chromium/v8/src/parsing/scanner-inl.h

// Copyright 2018 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.

#ifndef V8_PARSING_SCANNER_INL_H_
#define V8_PARSING_SCANNER_INL_H_

#include "src/parsing/keywords-gen.h"
#include "src/parsing/scanner.h"
#include "src/strings/char-predicates-inl.h"
#include "src/utils/utils.h"

namespace v8 {
namespace internal {

// ----------------------------------------------------------------------------
// Keyword Matcher

#define KEYWORDS

constexpr bool IsKeywordStart(char c) {}

V8_INLINE Token::Value KeywordOrIdentifierToken(const uint8_t* input,
                                                int input_length) {}

// Recursive constexpr template magic to check if a character is in a given
// string.
template <int N>
constexpr bool IsInString(const char (&s)[N], char c, size_t i = 0) {}

inline constexpr bool CanBeKeywordCharacter(char c) {}

// Make sure tokens are stored as a single byte.
static_assert;

// Get the shortest token that this character starts, the token may change
// depending on subsequent characters.
constexpr Token::Value GetOneCharToken(char c) {}

// Table of one-character tokens, by character (0x00..0x7F only).
static const constexpr Token::Value one_char_tokens[128] =;

#undef KEYWORDS

V8_INLINE Token::Value Scanner::ScanIdentifierOrKeyword() {}

// Character flags for the fast path of scanning a keyword or identifier token.
enum class ScanFlags : uint8_t {};
constexpr uint8_t GetScanFlags(char c) {}
inline bool TerminatesLiteral(uint8_t scan_flags) {}
inline bool CanBeKeyword(uint8_t scan_flags) {}
inline bool IdentifierNeedsSlowPath(uint8_t scan_flags) {}
inline bool MultilineCommentCharacterNeedsSlowPath(uint8_t scan_flags) {}
inline bool MayTerminateString(uint8_t scan_flags) {}
// Table of precomputed scan flags for the 128 ASCII characters, for branchless
// flag calculation during the scan.
static constexpr const uint8_t character_scan_flags[128] =;

inline bool CharCanBeKeyword(base::uc32 c) {}

V8_INLINE Token::Value Scanner::ScanIdentifierOrKeywordInner() {}

V8_INLINE Token::Value Scanner::SkipWhiteSpace() {}

V8_INLINE Token::Value Scanner::ScanSingleToken() {}

void Scanner::Scan(TokenDesc* next_desc) {}

void Scanner::Scan() {}

}  // namespace internal
}  // namespace v8

#endif  // V8_PARSING_SCANNER_INL_H_