Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RegexParser Class Reference

#include <RegexParser.h>

Public Member Functions

RegexNode parse (std::string source)
 

Detailed Description

Turns a simple regular expression into a parse tree. The regular expression syntax supports only the basic quantifiers ('*', '+', and '?'), alternation ('|'), character sets ('[a-z]'), and groups ('()').

Definition at line 21 of file RegexParser.h.

Member Function Documentation

◆ parse()

RegexNode RegexParser::parse ( std::string  source)

Definition at line 17 of file RegexParser.cpp.

17 {
18 fSource = source;
19 fIndex = 0;
20 SkASSERT(fStack.size() == 0);
21 this->regex();
22 SkASSERT(fStack.size() == 1);
23 SkASSERT(fIndex == source.size());
24 return this->pop();
25}
#define SkASSERT(cond)
Definition SkAssert.h:116
SkBitmap source
Definition examples.cpp:28

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