Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::RegExpAtom Class Reference

#include <regexp_ast.h>

Inheritance diagram for dart::RegExpAtom:
dart::RegExpTree dart::ZoneAllocated

Public Member Functions

 RegExpAtom (ZoneGrowableArray< uint16_t > *data, RegExpFlags flags)
 
virtual void * Accept (RegExpVisitor *visitor, void *data)
 
virtual RegExpNodeToNode (RegExpCompiler *compiler, RegExpNode *on_success)
 
virtual RegExpAtomAsAtom ()
 
virtual bool IsAtom () const
 
virtual bool IsTextElement () const
 
virtual intptr_t min_match () const
 
virtual intptr_t max_match () const
 
virtual void AppendToText (RegExpText *text)
 
ZoneGrowableArray< uint16_t > * data () const
 
intptr_t length () const
 
RegExpFlags flags () const
 
bool ignore_case () const
 
- Public Member Functions inherited from dart::RegExpTree
virtual ~RegExpTree ()
 
virtual void * Accept (RegExpVisitor *visitor, void *data)=0
 
virtual RegExpNodeToNode (RegExpCompiler *compiler, RegExpNode *on_success)=0
 
virtual bool IsTextElement () const
 
virtual bool IsAnchoredAtStart () const
 
virtual bool IsAnchoredAtEnd () const
 
virtual intptr_t min_match () const =0
 
virtual intptr_t max_match () const =0
 
virtual Interval CaptureRegisters () const
 
virtual void AppendToText (RegExpText *text)
 
void Print ()
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Static Public Attributes inherited from dart::RegExpTree
static constexpr intptr_t kInfinity = kMaxInt32
 

Detailed Description

Definition at line 219 of file regexp_ast.h.

Constructor & Destructor Documentation

◆ RegExpAtom()

dart::RegExpAtom::RegExpAtom ( ZoneGrowableArray< uint16_t > *  data,
RegExpFlags  flags 
)
inline

Definition at line 221 of file regexp_ast.h.

222 : data_(data), flags_(flags) {}
RegExpFlags flags() const
Definition: regexp_ast.h:233
ZoneGrowableArray< uint16_t > * data() const
Definition: regexp_ast.h:231

Member Function Documentation

◆ Accept()

virtual void * dart::RegExpAtom::Accept ( RegExpVisitor visitor,
void *  data 
)
virtual

Implements dart::RegExpTree.

◆ AppendToText()

void dart::RegExpAtom::AppendToText ( RegExpText text)
virtual

Reimplemented from dart::RegExpTree.

Definition at line 212 of file regexp.cc.

212 {
213 text->AddElement(TextElement::Atom(this));
214}
static TextElement Atom(RegExpAtom *atom)
Definition: regexp.cc:225
std::u16string text

◆ AsAtom()

virtual RegExpAtom * dart::RegExpAtom::AsAtom ( )
virtual

◆ data()

ZoneGrowableArray< uint16_t > * dart::RegExpAtom::data ( ) const
inline

Definition at line 231 of file regexp_ast.h.

231{ return data_; }

◆ flags()

RegExpFlags dart::RegExpAtom::flags ( ) const
inline

Definition at line 233 of file regexp_ast.h.

233{ return flags_; }

◆ ignore_case()

bool dart::RegExpAtom::ignore_case ( ) const
inline

Definition at line 234 of file regexp_ast.h.

234{ return flags_.IgnoreCase(); }
bool IgnoreCase() const
Definition: object.h:12723

◆ IsAtom()

virtual bool dart::RegExpAtom::IsAtom ( ) const
virtual

◆ IsTextElement()

virtual bool dart::RegExpAtom::IsTextElement ( ) const
inlinevirtual

Reimplemented from dart::RegExpTree.

Definition at line 227 of file regexp_ast.h.

227{ return true; }

◆ length()

intptr_t dart::RegExpAtom::length ( ) const
inline

Definition at line 232 of file regexp_ast.h.

232{ return data_->length(); }
intptr_t length() const

◆ max_match()

virtual intptr_t dart::RegExpAtom::max_match ( ) const
inlinevirtual

Implements dart::RegExpTree.

Definition at line 229 of file regexp_ast.h.

229{ return data_->length(); }

◆ min_match()

virtual intptr_t dart::RegExpAtom::min_match ( ) const
inlinevirtual

Implements dart::RegExpTree.

Definition at line 228 of file regexp_ast.h.

228{ return data_->length(); }

◆ ToNode()

RegExpNode * dart::RegExpAtom::ToNode ( RegExpCompiler compiler,
RegExpNode on_success 
)
virtual

Implements dart::RegExpTree.

Definition at line 3795 of file regexp.cc.

3796 {
3797 ZoneGrowableArray<TextElement>* elms =
3798 new (OZ) ZoneGrowableArray<TextElement>(1);
3799 elms->Add(TextElement::Atom(this));
3800 return new (OZ) TextNode(elms, compiler->read_backward(), on_success);
3801}
#define OZ
Definition: regexp.cc:3793

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