Flutter Engine
 
Loading...
Searching...
No Matches
CommentsUtil Class Reference

Helper functions for the generated comments lexer. More...

#include <comments_util.h>

Static Public Member Functions

static void AddTrimLine (std::string *buffer, const char *text, size_t length)
 
static void AddCTrimLine (std::string *buffer, const char *text, size_t length)
 
static void AddCEndTrimLine (std::string *buffer, const char *text, size_t length)
 

Detailed Description

Helper functions for the generated comments lexer.

Definition at line 11 of file comments_util.h.

Member Function Documentation

◆ AddCEndTrimLine()

void CommentsUtil::AddCEndTrimLine ( std::string *  buffer,
const char *  text,
size_t  length 
)
static

Definition at line 31 of file comments_util.cc.

33 {
34 re2::StringPiece captured_content;
35 RE2::PartialMatch(re2::StringPiece(text), kAddCEndTrimLineRegex,
36 &captured_content);
37 buffer->append(captured_content);
38}
static RE2 kAddCEndTrimLineRegex(R"regex(^\s*(.*?)\*/)regex")
std::u16string text
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set profile Make the profiler discard new samples once the profiler sample buffer is full When this flag is not the profiler sample buffer is used as a ring buffer
Definition switch_defs.h:98

References kAddCEndTrimLineRegex(), and text.

◆ AddCTrimLine()

void CommentsUtil::AddCTrimLine ( std::string *  buffer,
const char *  text,
size_t  length 
)
static

Definition at line 21 of file comments_util.cc.

23 {
24 re2::StringPiece captured_content;
25 RE2::PartialMatch(re2::StringPiece(text), kAddCTrimLineRegex,
26 &captured_content);
27 buffer->append(captured_content);
28 buffer->push_back('\n');
29}
static RE2 kAddCTrimLineRegex(R"regex(^(?:\s*\**\s)?(.*?)(?:\s*\**\s*)?$)regex")

References kAddCTrimLineRegex(), and text.

◆ AddTrimLine()

void CommentsUtil::AddTrimLine ( std::string *  buffer,
const char *  text,
size_t  length 
)
static

Definition at line 13 of file comments_util.cc.

15 {
16 std::string chopped(text, length);
17 RE2::Replace(&chopped, kAddTrimLineRegex, "");
18 buffer->append(chopped);
19}
static RE2 kAddTrimLineRegex(R"regex(^(?:\s*(?://|#)\s?))regex")
size_t length

References kAddTrimLineRegex(), length, and text.


The documentation for this class was generated from the following files: