| 1 |
//===--- NumericLiteralInfo.h -----------------------------------*- C++ -*-===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#ifndef LLVM_CLANG_LIB_FORMAT_NUMERICLITERALINFO_H |
| 10 |
#define LLVM_CLANG_LIB_FORMAT_NUMERICLITERALINFO_H |
| 11 |
|
| 12 |
#include "llvm/ADT/StringRef.h" |
| 13 |
|
| 14 |
namespace clang { |
| 15 |
namespace format { |
| 16 |
|
| 17 |
struct NumericLiteralInfo { |
| 18 |
size_t BaseLetterPos = llvm::StringRef::npos; // as in 0b1, 0xF, etc. |
| 19 |
size_t DotPos = llvm::StringRef::npos; // pos of decimal/hex point |
| 20 |
size_t ExponentLetterPos = llvm::StringRef::npos; // as in 9e9 and 0xFp9 |
| 21 |
size_t SuffixPos = llvm::StringRef::npos; // starting pos of suffix |
| 22 |
|
| 23 |
NumericLiteralInfo(llvm::StringRef Text, char Separator = '\''); |
| 24 |
}; |
| 25 |
|
| 26 |
} // end namespace format |
| 27 |
} // end namespace clang |
| 28 |
|
| 29 |
#endif |